2013-04-29 45 views
-3

如何创建一个箭头而不使用HTML中的图像?我有一个jQuery插件或褒奖,他们已经创建了一个箭头,而无需使用图像通过使用以下样式:如何在HTML中不使用图像创建箭头?

#testimonials .item div.text:after { 
    content: " "; 
    border: 10px solid transparent; 
    border-right-color: #fff; 
    display: block; 
    width: 0; 
    height: 0; 
    margin-top: -10px; 
    position: absolute; 
    left: -20px; 
    top: 50%; 
} 

我找不出这个风格。

+1

使用箭头字符。 – Oded 2013-04-29 11:35:49

+0

可能的重复[这个CSS三角形的形状如何工作?](http://stackoverflow.com/questions/7073484/how-does-this-css-triangle-shape-work) – Bojangles 2013-04-29 11:38:22

+3

我不知道[Google]( http://hedgerwow.appspot.com/demo/arrows)[was](http://www.yuiblog.com/blog/2010/11/22/css-quick-tip-css-arrows-and-shapes-无标记/)[破](http://css-tricks.com/snippets/css/css-triangle/) – Bojangles 2013-04-29 11:38:41

回答

3

←将创建一个←字符

→将创建一个→字符。

等。

看一看HTML characters

这实际上取决于你想创建什么样的箭头。

1

无论使用Web字体像Font Awesome其他如@Oded说,你可以用用CSS content财产的箭头人物,在列表中的情况下,或使用HTML实体,如←→

Demo

ul li:before { 
    content: '→ '; 
}