1、标签
.i{ background:red; width:40px; height:20px; position:relative; color:white; } .i:after{ content:‘‘; position: absolute; display: inline-block; right: -12px; border: 10px solid red; border-width: 10px 6px; border-right-color: transparent; z-index: -1; } <div class="i"></div>
.hot { position: absolute; font-size: 9px; line-height: 13px; color: #fff; height: 13px; padding: 1px 4px; text-align: center; top: 5px; white-space: nowrap; background-image: linear-gradient(-270deg, #de00e0 0%, #ff3434 96%); border-top-left-radius: 6px; border-bottom-right-radius: 6px; } <div class="hot">HOT</div>
.quan{ background:linear-gradient(-270deg, #f81818 0%, #ff3434 96%);; width:24px; height:25px; position:relative; border-radius:3px; color:#fff; line-height:25px; text-align:center; font-size:13px; } .quan:before{ content:‘‘; width:3px; height:3px; background:#fff; position:absolute; top:50%; left:0; margin-top:-2px; border-radius:1px; } .quan:after{ content:‘‘; width:3px; height:3px; background:#fff; position:absolute; top:50%; right:0; margin-top:-2px; border-radius:1px; } <div class="quan">券</div>
原文:https://www.cnblogs.com/panyujun/p/10530573.html