答案 0 :(得分:1)
Flexbox和一些伪元素使这很简单。
span {
display: flex;
width: 100%;
justify-content: center;
align-items: center;
}
span::before,
span::after {
content: '';
flex: 1;
height: 2px;
background: teal;
margin: .5em;
}

<span><img src="http://www.swimmingpoolmosaics.com/images/thumbnails/50/50/variant_image/0/fleur-de-lis-teal.jpg" alt="" /></span>
&#13;
答案 1 :(得分:1)
重新审视了典型的人力资源。
您可以使用伪在其上引入图像:
hr {
position:relative;
margin:2em 1em;
color:lighgray;
}
hr:before {
content:url(http://i1253.photobucket.com/albums/hh600/fleur-de-lis-xxx/favicon-bright.png);
position:absolute ;
text-align:center;
left:50%;
background:white;
z-index:1;
height:2em;
width:30px;
margin:-15px;
}
<hr/>
答案 2 :(得分:1)
这是一个使用伪元素:after
.separator { border-bottom: 1px solid #333; position: relative; margin-top: 30px; }
.separator:after {
content: "";
position: absolute;
left: 50%;
margin-left: -25px; /* half of the image width */
top: -20px;
background: url('http://www.swimmingpoolmosaics.com/images/thumbnails/50/50/variant_image/0/fleur-de-lis-teal.jpg') no-repeat #fff;
width: 50px;
height: 50px;
}
<div class="separator"></div>