css3實現鋸齒邊框(用於優惠券或郵票等)
阿新 • • 發佈:2019-02-07
<div class="sawtooth-bor"> <div class="pt10 bor_r_dashed clearfix pr10 pb8 flex-item pl10 bg-cffb937"> <h3 class="fs36">¥50</h3> <div class="fs12 lh18">滿498使用</div> <div class="fs12 lh18">有效期2018.03.16-2018.05.31</div> </div> <div class="textc flex-align-self w102 bg-cffb937 lhh90 mr5">立即領取</div></div>
padding-left: 5px; color: #fff; box-sizing: border-box; background: radial-gradient(transparent 0, transparent 4px, #ffb937 4px); background-size: 15px 14px; background-position : 8px 0px; background-color: #fff;}.discount{ border-right: 1px dashed #f5f5f5;padding: 10px; flex: 1; box-sizing: border-box; background-color: #ffb937;}.receive{ text-align: center; width: 102px; line-height: 90px; height: 90px; box-sizing: border-box; margin-right: 5px; background-color: #ffb937 ;}
css
.sawtooth-bor{ display: flex;padding-left: 5px; color: #fff; box-sizing: border-box; background: radial-gradient(transparent 0, transparent 4px, #ffb937 4px); background-size: 15px 14px; background-position
效果: