Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.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_Combinations_Css Selectors - Fatal编程技术网

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>