当前位置: 移动技术网 > IT编程>网页制作>CSS > css3 伪类实现右箭头→

css3 伪类实现右箭头→

2019年12月11日  | 移动技术网IT编程  | 我要评论

css3 实现右箭头→

<!doctype html>
 <html lang="en">
 <head>
     <meta charset="utf-8">
     <title>document</title>
 </head>
 <style>
.divtest{
    position: absolute;
    top: 100px;
    left: 100px;
    height: 3px;
    width: 10px;
    padding-left: 30px;
    background: red;
    line-height: 40px;
}
.divtest:before{
   content: '';
    position: absolute;
    top: -3px;
    right: -1px;
    width: 7px;
    height: 7px;
    border-top: 2px solid red;
    border-right: 2px solid red;
    transform: rotate(45deg);
}

</style>
 <body>
     <div class="divtest">
<!-- 这是一个箭头 -->
</div>
 </body>
 </html>

 

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网