赞
踩
刚接触微信小程序,今天碰到个button小问题,所以记录分享一下...
结构:
- <view class='left'>
- <button>新品</button>
- <button>视频</button>
- <button>课程</button>
- <button>电子书</button>
- <button>纸质书</button>
- </view>
我这简单单写一个button样式:
- .left button{
- border: none;
- margin-top: 5rpx;
- line-height: 105rpx;
- background-color:#eeeeee;
- color:#0f7bda;
- border-radius: 0;
- }
效果:
虽然写了border: none;和border-radius: 0;
但是去不掉button的圆角和边框阴影,在wxss中的.btn中直接修改是达不到目的的;
只能在 :after 样式里修改去掉border属性:
- .left button::after{
- border: none;
- border-radius: 0;
- }
效果(这里已经将边框阴影和圆角去掉了):
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。