【发布时间】:2014-10-01 13:29:54
【问题描述】:
我正在使用 Twitter Bootstrap 的 CSS,由于某些原因它覆盖了我的一些类。
首先我在我的自定义 CSS 之前加载它(我使用的是 jam 和 stylus 模板引擎): HTML 标头:
doctype html
html
head
title= title
link(rel='stylesheet', href='/css/vendor/bootstrap.min.css')
link(rel='stylesheet', href='/css/style.css')
在我的 HTML 正文中:
table.table.table-striped
thead
th some items
th some items
th some items
tbody
tr
td.table__td
a.table__link(href='/') some items
tr
td.table__td
a.table__link(href='/') some items
tr
td.table__td
a.table__link(href='/') some items
CSS:
.table__td
padding 0
但是我在我的表 td 上得到了原始的 8px 填充:
怎么会这样?
非常感谢
【问题讨论】:
-
google 'css 选择器特异性'
-
你缺少括号?
-
这里有很好的解释:Specifics on css specificity
标签: html css twitter-bootstrap pug stylus