网友真实露脸自拍10p,成人国产精品秘?久久久按摩,国产精品久久久久久无码不卡,成人免费区一区二区三区

小程序模板網

微信小程序:button組件的邊框設置

發布時間:2017-12-29 18:07 所屬欄目:小程序開發教程

button的邊框是用:after方式實現的,用戶如果在button上定義邊框會出現兩條線,需用:after的方式去覆蓋默認值。如果設置了Button的背景色,沒有用:after設置邊框的顏色,則button的四個角會出現模糊的尖角。如下圖所 ...

 
 
 

button的邊框是用:after方式實現的,用戶如果在button上定義邊框會出現兩條線,需用:after的方式去覆蓋默認值。

如果設置了Button的背景色,沒有用:after設置邊框的顏色,則button的四個角會出現模糊的尖角。如下圖所示:

 

如上圖四個角會模糊。.wxss代碼如下:

 

		
  1. .clickEncryptBtn{
  2. width:130px;
  3. border-radius: 3px;
  4. margin:20px auto;
  5. padding-top:2px;
  6. font-size:14px;
  7. background-color:#CC3333;
  8. <strong> border:1px solid #CC3333</strong>
  9. color:white;
  10. overflow:hidden;
  11. height:40px;
  12. }

在這里設置了邊框的樣式,但是沒有生效。  修改:將.wxss代碼修改如下:

 

		
  1. .clickEncryptBtn{
  2. width:130px;
  3. border-radius: 3px;
  4. margin:20px auto;
  5. padding-top:2px;
  6. font-size:14px;
  7. background-color:#CC3333;
  8. color:white;
  9. overflow:hidden;
  10. height:40px;
  11. }
  12.  
  13. <strong>.clickEncryptBtn::after{
  14. border:1px solid #CC3333;
  15. }</strong>

將Button的邊框設置放在::after屬性里面。效果如下:

 

 

從上圖可以看出,四個角不模糊了。

 

總結:對于button的邊框設置,要放在::after里面設置,才生效,要不然會出現各種怪異現象



易優小程序(企業版)+靈活api+前后代碼開源 碼云倉庫:starfork
本文地址:http://www.xiuhaier.com/wxmini/doc/course/18309.html 復制鏈接 如需定制請聯系易優客服咨詢:800182392 點擊咨詢
QQ在線咨詢
AI智能客服 ×