如果我有一个标题标签 <h1 class="hc-reform">title</h1>
h1.hc-reform{
float:left;
font-size:30px;
color:#0e73bb;
font-weight:bold;
margin:10px 0px;
}
然后我有一段<p>stuff here</p>
.
如何确保每个 <p>
使用 CSS h1.hc-reform
之后的标签使用:clear:both;
会是:
h1.hc-reform > p{
clear:both;
}
由于某种原因,这不起作用。
最佳答案
关于html - CSS中下一个元素的选择器的语法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3660046/