向外箭头

时间:2015-04-22 09:14:37

标签: html css css-shapes

所以我有一个看起来像这样的页面:

how it looks now

但我希望线条像箭头一样: what i would like to have

这可以吗???

我目前的css:

#show_length{
    border-bottom: 2px solid black;
    width: 99%;
}

#show_length2{
    border-bottom: 2px solid black;
    width: 20%;
}

<div id="show_length">25m</div>
<div id="show_length2">2.5m</div>

1 个答案:

答案 0 :(得分:4)

您可以使用pseudo-elements

执行类似的操作

&#13;
&#13;
#show_length{
    border-bottom: 2px solid black;
    width: 300px;
}
#show_length:after{
    content:">";
    position:absolute;
    font-weight:bold;
    margin-left:265px;
    margin-top:2px;
    font-size:30px;
}

#show_length2{
    border-bottom: 2px solid black;
    width: 100px;
}
&#13;
<div id="show_length">25m</div>
<div id="show_length2">2.5m</div>
&#13;
&#13;
&#13;