CSS选择器和标记组合
我有一系列像这样的标签CSS选择器和标记组合,css,combinations,css-selectors,Css,Combinations,Css Selectors,我有一系列像这样的标签 <div id="info"> <h1>some title</h1> <p>some content</p> <h1>some title</h1> <p>some content</p> <h1>some title</h1> <p>some content</p>
<div id="info">
<h1>some title</h1>
<p>some content</p>
<h1>some title</h1>
<p>some content</p>
<h1>some title</h1>
<p>some content</p>
</div>
但即使在最后一段之后,我还是得到了分隔符。。。你能帮我解决一下我的风格有什么问题吗?
谢谢 试试这个
#info h1+p:not(last-of-type):after{
content: " " url(../img/dotseparator.png);
padding-top:25px;
display:block;
height:8px;
}
这对分离器来说很简单
一些头衔
一些内容
一些头衔
一些内容
一些头衔
一些内容
谢谢,我希望它是“自动”的,但我想我会使用HR
#info h1+p:not(last-of-type):after{
content: " " url(../img/dotseparator.png);
padding-top:25px;
display:block;
height:8px;
}
<div id="info">
<h1>some title</h1>
<hr>
<p>some content</p>
<hr>
<h1>some title</h1>
<hr>
<p>some content</p>
<hr>
<h1>some title</h1>
<hr>
<p>some content</p>
<hr>
</div>