问题遇到的现象和发生背景
微信小程序
问题相关代码,请勿粘贴截图
.container {
border-top: 1rpx solid #cdcdcd;
padding: 20rpx;
}
.box {
padding: 30rpx;
}
.one {
position: relative;
padding-bottom: 40rpx;
}
.onedot {
left: 5rpx;
width: 25rpx;
height: 25rpx;
position: absolute;
background-color: #36678f;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
z-index: 1;
}
.oneline {
position: absolute;
left: 15rpx;
height: 100%;
border-left: 2px solid #e4e7ed;
}
.onemain {
position: relative;
padding-left: 45rpx;
top: -5rpx;
}
.onemaintitle {
margin-bottom: 8rpx;
padding-top: 6rpx;
color: #525252;
line-height: 0.95;
font-size: 27rpx;
}
.onemaintime {
margin-bottom: 10rpx;
padding-top: -4rpx;
color: #909399;
line-height: 0.75;
font-size: 20rpx;
}
.oneunderline {
position: absolute;
height: 10%;
border-bottom: 2px solid #909399;
}
.onemaincon {
margin-left: 3rpx;
font-size: 32rpx;
color: #112714;
}
.button {
padding: auto;
bottom: 50rpx;
right: 50rpx;
border-radius:50%;
position:fixed;
background:#ff6700;
font-size: 25rpx;
color:#fff;
width: 50rpx !important;
}
<navigator url="../addtrash/addtrash">
<button class="addnew">
+
</button>
</navigator>
<view class="box">
<view wx:for="{{list}}" wx:key="index" class="one">
<view class="onedot"></view>
<view wx:if="{{index!=list.length-1}}" class="oneline"></view>
<view class="onemain">
<view class="onemaintitle"> {{item.title}}</view>
<view class="onemaintime">{{item.time}}</view>
<view class="onemaincon">{{item.sentence}}</view>
</view>
</view>
</view>
运行结果及报错内容
当按钮悬浮的时候不能够点击并跳转至新页面
我的解答思路和尝试过的方法
但当按钮样式不被规定 默认置于最顶的时候 能够点击后跳转至新页面
我想要达到的结果
按钮悬浮于界面右下角 同时点击后能够跳转至新页面