<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
原文地址:https://www.cnblogs.com/longtengfly/p/9337863.html
时间: 2024-10-17 12:42:46