出问题前
设置了
width: 0 !important;
max-width: 0 !important;
min-width: 0 !important;
都不生效
需要设置
width:fit-content !important;
width:-webkit-fit-content !important;
width:-moz-fit-content !important;
才生效
改后的样式
代码如下
/deep/ .wx-swiper-dots {
position: absolute !important;
bottom: 50rpx !important;
right: 0 !important;
background: #ebe0de !important;
border: 2rpx solid #9c9e9b !important;
height: 40rpx !important;
line-height:58rpx !important;
padding: 0 20rpx !important;
width:fit-content !important;
width:-webkit-fit-content !important;
width:-moz-fit-content !important;
border-radius: 20rpx !important;
}