小程序中使用横向溢出滚动 ios中点击元素修改字体颜色时溢出部分无法修改字体颜色 安卓正常 啥原因?
上面是点击选中后 下面是初始状态
wxml部分
<view class="scroll_class"
class="answer {{item.userTopicId === option.id ? 'isChoose' : ''}}"
wx:for="{{item.optionList}}"
wx:key="opIndex"
wx:for-item="option"
wx:for-index="opIndex">
<view class="answerText" catchtap="pageClick" data-type="choose" data-item="{{option}}" data-pindex="{{index}}">{{option.showContent}}</view>
</view>
wxss部分
.answer {
width: 590rpx;
height: 110rpx;
border-radius: 55rpx;
font-size: 36rpx;
color: #000000;
background: #F6F6F6;
margin-top: 40rpx;
text-align: left;
box-sizing: border-box;
transition: all 0.3s;
}
.answerText {
line-height: 110rpx;
box-sizing: border-box;
white-space: nowrap;
overflow-x: scroll;
margin: 0 40rpx 0 96rpx;
max-width: 100%;
}
.isChoose {
background: linear-gradient(180deg,#1FB6ED,#1F83ED);
color: white;
}