[英]Can I override bootstrap's defaults in a single css selector?
I want to get rid of outlines
in Firefox, however they're pointed more deeply than my style.css
in bootstrap3.css
so I need to update them all. 我想摆脱Firefox中的
outlines
,但是它们的指向要比bootstrap3.css
style.css
指向的要深,因此我需要全部更新它们。
I've tried the following: 我尝试了以下方法:
<link href="{{ URL::to('home_assets/css/bootstrap.min.css') }}" rel="stylesheet" media="screen">
<link href="{{ URL::to('home_assets/css/style.css') }}" rel="stylesheet" media="screen">
Example below didn't work because Bootstrap 3 points more deeply. 下面的示例不起作用,因为Bootstrap 3更深入。
//bootstrap
a.carousel-control
{
outline: thin dotted;
}
//my css
body {
outline: none !important;
}
Result: a.carousel-control has thin dotted outline.
I need to do something like to remote outline. 我需要做一些类似的事情来勾勒轮廓。 (and it works)
(并且有效)
a.carousel-control
{
outline: none;
}
The problem is, then I need to point everything in markup deeply so it overrides bootstrap. 问题是,然后我需要将标记中的所有内容都指向深处,以便它覆盖引导程序。 I need to encapsulate most of Bootstrap's css.
我需要封装大多数Bootstrap的CSS。
Is there a functionality like this in CSS, so I can manage them from a single place? CSS中是否有类似的功能,因此我可以从一个地方进行管理?
body {
outline: none !override-previous; //pseudo
}
Any hacks or tricks to manage them in a single place? 有任何技巧或技巧可以在一个地方进行管理吗? (no javascript, css expressions are okay though)
(没有javascript,css表达式也可以)
Ps. PS。 I need this for my dev environment because I keep outlines as default on production to help blind users.
我在开发环境中需要此功能,因为我在生产时将轮廓保留为默认设置以帮助盲人用户。 They're annoying for me, though.
不过,他们让我很烦。
You can try 你可以试试
*{
outline: none !important;
}
and please add this after your bootstrap.css file so that it'll override. 并将其添加到bootstrap.css文件之后,以使其覆盖。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.