页面
<view class="round-click" bind:tap="test">
点我添加
</view>
样式
.round-click{
height: 120rpx;
width: 120rpx;
background-color: #d92a2a;
border-radius: 100%;
position: fixed;
bottom: 150rpx;
right: 20rpx;
display: flex;
align-items: center;
justify-content: center;
z-index: 9;
}
.round-click navigator{
font-size: 32rpx;
max-width: 80rpx;
color: #fff;
text-align: center;
}
js
test(){
console.log("点击了");
}
是不是 skyline 模式下,还不支持 fixed
代码检查没啥问题,我这可以触发点击事件。重新打开发者工具或者切换高版本基础库,页面是否有其他元素标签层级更高的有影响?