将轮播图样式改为圆角。在安卓系统里运行,没有一点问题,但是在ios系统中运行时,图片静止时,轮播图为圆角,但是当触摸滑动时候,外边框就变成了直角。css中关于border-radius都做了兼容性写法。这样的情况如何解决。

html:

<view class='body'>

<!--顶部轮播图  -->

<swiper class="moveBox" indicator-dots="{{indicatorDots}}" id="custom_swiper"

autoplay="{{autoplay}}" interval="{{interval}}" indicator-color="rgb(255,255,255)" indicator-active-color="rgb(255, 0,0)" duration="{{duration}}" circular="{{circular}}" bindchange="swiperchange">

<block wx:for="{{imgUrls}}" wx:key="images">

<navigator  url="../detial/detial" hover-class="navigator-hover">

<swiper-item class="moveBox">

<image src="{{item}}" class="slide-image topimage" mode="scaleToFill"/>

</swiper-item>

</navigator>

</block>

</swiper>

</view>

css


/*顶部轮播图样式  */

.body{

padding: 0 5%;

}

#custom_swiper{

-moz-border-radius: 30rpx !important;

-webkit-border-radius: 30rpx !important;

border-radius: 30rpx !important;

overflow: hidden;

height: 600rpx;

}

.topimage{

width: 100%;

height: 100%;

-moz-border-radius: 30rpx !important;

-webkit-border-radius: 30rpx !important;

border-radius: 30rpx !important;

}

.moveBox{

-moz-border-radius: 30rpx !important;

-webkit-border-radius: 30rpx !important;

border-radius: 30rpx !important;

}




展开全部
收起
3回答
提交回答
  • 至过去的我

    2044人对此回答表示赞同

    我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>
    发布于
  • Christopher

    17人对此回答表示赞同

    这个问题是否指都是:iOS手机上image组件使用radius实现圆角都会有限制。

    展开
    17
    0回复
    发布于 6年前

    评论(0)

    收起评论

  • 龙骑士

    9人对此回答表示赞同

    轮播图滑动时,图片会出现这个情况。图片如果仅仅静态的展示,可以加个父级让它显示的为圆角。

    展开
    9
    0回复
    发布于 6年前

    评论(0)

    收起评论

  • Sakura_1

    6人对此回答表示赞同

    你好。这是iOS系统的已知限制,目前暂时无法解决。

    展开
    6
    0回复
    发布于 6年前

    评论(0)

    收起评论

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
咨询热线

13312967497

扫码添加业务即可随时咨询 还可领取小程序推广攻略

业务咨询: 13312967497
扫码咨询

扫码咨询套餐

回到顶部