为什么它总是有 carousel.less 继承样式代码到我的 bootstrap html 代码
Why it always has carousel.less which inherit style code to my bootstrap html code
我使用 Bootstrap 制作了一个 Carousel Side 页面。
我试图更改 .Carousel-Caption 中的字体。
但是字体总是有阴影。
我检查了代码,我发现它来自 .carousel.less 文件。
我的 CSS 文件夹中没有它。我怎样才能阻止它或解决这个问题。
谢谢
enter image description here
您可以 customize Bootstrap precompiled files. Set values of LESS carousel parameters 并下载 Bootstrap 的自定义版本。使用 none
代替 @carousel-text-shadow
删除不需要的阴影。
也可以在您的页面中包含另一个 CSS 文件,其中包含
.carousel-caption {
text-shadow: none;
}
注意,此文件必须包含在 bootstrap.css(或bootstrap.min.css之后) 覆盖 Bootstrap 样式。例如:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"/>
<link rel="stylesheet" href="mystylesheet.css"/>
但是第一种方式更好
我使用 Bootstrap 制作了一个 Carousel Side 页面。 我试图更改 .Carousel-Caption 中的字体。 但是字体总是有阴影。
我检查了代码,我发现它来自 .carousel.less 文件。 我的 CSS 文件夹中没有它。我怎样才能阻止它或解决这个问题。
谢谢 enter image description here
您可以 customize Bootstrap precompiled files. Set values of LESS carousel parameters 并下载 Bootstrap 的自定义版本。使用 none
代替 @carousel-text-shadow
删除不需要的阴影。
也可以在您的页面中包含另一个 CSS 文件,其中包含
.carousel-caption {
text-shadow: none;
}
注意,此文件必须包含在 bootstrap.css(或bootstrap.min.css之后) 覆盖 Bootstrap 样式。例如:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"/>
<link rel="stylesheet" href="mystylesheet.css"/>
但是第一种方式更好