我正在使用Bootstrap,它具有以下元素:
p {
margin: 0 0 10px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 10px;
margin-left: 0px;
}
我不想在标签的末尾有空格,所以我写了以下内容:
.p {
margin: 0 0 0px !important;
margin-bottom: 0px !important;
}
但是,空白区域仍然显示在底部。
当我查看Chrome开发者工具时,p
元素未更改。
为什么我的CSS代码没有改变元素?
答案 0 :(得分:1)
.p
表示您指的是课程p
。
如果您想修改p
代码的某些属性,只需使用p
那么,
p {
margin: 0 0 0px !important;
margin-bottom: 0px !important;
}
答案 1 :(得分:1)
.p
选择类p
的元素,例如。 <span class="p"></span>
你想要以下......
p {
margin: 0 0 0px !important;
margin-bottom: 0px !important;
}