使用CSS样式实现此hr元素 – 伪元素

我很难找到一个解决方案来根据我的喜好设计一个hr元素.

如果您查看以下小提琴,您将看到hr元素同时具有:before和:之后添加了pseudos.

http://jsfiddle.net/MattStrange/LGEjp/

到目前为止这是我想要的,两边的两个圆都是正确的,但现在我想将一个图像添加到线的确切中心,但因为两个伪都被占用我不知道如何添加背景图像到这个小时.

<hr class="bolt">
hr {
  border: 0 solid #eeedef;
  border-top-width: 1px;
  height: 0;
  margin-top: 60px;
  margin-bottom: 60px;
  float: left;
  clear: both;
  display: block;
  width: 100%;
  position: relative;
}
hr:before,hr:after {
  content: " ";
  width: 5px;
  height: 5px;
  position: absolute;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  border-radius: 50%;
  border: 1px solid #e5e5e5;
  background-color: #fff;
}
hr:before {
  left: 0;
  bottom: -3px;
}
hr:after {
  bottom: -3px;
  right: 0;
}

非常感谢帮助.

干杯

解决方法

您可以使用 :

>一个伪绘制2轮,第一轮绘制边框,
第二是它的影子.
>另一个伪带来的图像.

http://codepen.io/gcyrillus/pen/dHaus

相关文章

Css3如何实现鼠标移上变长特效?(图文+视频)
css3怎么实现鼠标悬停图片时缓慢变大效果?(图文+视频)
jquery如何实现点击网页回到顶部效果?(图文+视频)
css3边框阴影效果怎么做?(图文+视频)
css怎么实现圆角边框和圆形效果?(图文+视频教程)
Css3如何实现旋转移动动画特效