Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
删除css选择器属性而不更改源css?_Css_Twitter Bootstrap - Fatal编程技术网

删除css选择器属性而不更改源css?

删除css选择器属性而不更改源css?,css,twitter-bootstrap,Css,Twitter Bootstrap,假设我想从中重写引导表类 .table { width: 100%; max-width: 100%; margin-bottom: 20px; 致: 我不想将margin-bottom重写为0,因为我希望它保留其父级为其定义的内容,如何在不更改实际bootstrap.css文件的情况下实现这一点?您可以向html中的元素添加另一个类,并将margin-bottom设置为零。试试这个 .table { width: 100%; max-width: 10

假设我想从中重写引导表类

.table {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
致:


我不想将
margin-bottom
重写为
0
,因为我希望它保留其父级为其定义的内容,如何在不更改实际bootstrap.css文件的情况下实现这一点?

您可以向html中的元素添加另一个类,并将margin-bottom设置为零。

试试这个

.table {
    width: 100%;
    max-width: 100%;
    margin-bottom: auto; or margin-bottom: inherit;
}

“我不想将margin bottom重写为0,因为我希望它保留其父级将为其定义的内容”在这种情况下,您可以将margin bottom设置为inherit。我可能对此有误解,但您可以始终在bootstrap.css之后在文档中创建并链接一个custom.css文件,并在新css文件中应用更改。
.table {
    width: 100%;
    max-width: 100%;
    margin-bottom: auto; or margin-bottom: inherit;
}