带有向下箭头的HTML行

前端之家收集整理的这篇文章主要介绍了带有向下箭头的HTML行前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试绘制一条带有一个小箭头的线,如图所示.

我无法得到向下箭头.有没有办法可以用html和css做到这一点?

HTML

@H_404_6@<hr class="line">

CSS

@H_404_6@.line{ width:70%; color:red; }

http://jsfiddle.net/4eL39sm1/

谢谢.

解决方法

您可以使用伪元素:after和:before: @H_404_6@.line { width:70%; } .line:after { content:''; position: absolute; border-style: solid; border-width: 7px 7px 0; border-color: #FFFFFF transparent; display: block; width: 0; z-index: 1; top: 8px; left: 45%; } .line:before { content:''; position: absolute; border-style: solid; border-width: 7px 7px 0; border-color: #7F7F7F transparent; display: block; width: 0; z-index: 1; top: 9px; left: 45%; } @H_404_6@<hr class="line">

您可以使用边框宽度来根据需要调整大小.

猜你在找的HTML相关文章