小程序swiper圆角实现

原wxss样式
.slideshow {
width: 96%;
border-radius: 25rpx;
margin: 20rpx auto;
}
效果如下:


小程序swiper圆角实现
文章图片
如图,轮播图是矩形,没有理想中的圆角。
修改如下:
.slideshow {
width: 96%;
border-radius: 50rpx;
overflow: hidden;
margin: 20rpx auto;
}
效果如下:


小程序swiper圆角实现
文章图片
如图所示,轮播图为圆角矩形。
【小程序swiper圆角实现】重点在:overflow: hidden;

    推荐阅读