码迷,mamicode.com
首页 > Web开发 > 详细

css实现小箭头样式

时间:2018-07-19 21:25:13      阅读:579      评论:0      收藏:0      [点我收藏+]

标签:spl   lte   html   htm   div   rop   isp   abs   drop   

<div class="arrow"></div>

  

.arrow{
    position: absolute;
    display: block;
    left: -13px;
    top: 12px;
    margin-right: 3px;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 12px;
    border-left-width: 0;
    border-right-color: #e5e5e5;
    -webkit-filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
}
.arrow:after{
    content: " ";
    border-width: 12px;
    position: absolute;
    display: block;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    top: -12px;
    margin-left: 1px;
    border-left-width: 0;
    border-right-color: #fff;
}

  arrow元素的父元素的overflow属性必须为visible

css实现小箭头样式

标签:spl   lte   html   htm   div   rop   isp   abs   drop   

原文地址:https://www.cnblogs.com/longtengfly/p/9337863.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!