1. 程式人生 > >解決邊框顏色漸變時,border-radius失效的問題

解決邊框顏色漸變時,border-radius失效的問題

<span class="price_f"><span class="price_f1">¥183</span></span>
.price_f{display: inline-block;width:55px;height:22px;line-height:22px;text-align: center;color: #cccccc;font-size: 12px;padding: 1px;background-image: -webkit-linear-gradient(left, #0092fe 0%, #10a9c0 30%, #14afb0 60%);border-top-left-radius:7px;border-bottom-right-radius:7px;}
.price_f1{width: 100%;display: inline-block;background-color: #0b0b0b;border-top-left-radius:7px;border-bottom-right-radius:7px;}

 padding來實現我們想要的“模擬邊框”的效果