以下代码可用于在微信小程序中的客服咨询与用户分享操作。按钮通过设置 plain='true' 来使其显示为简单的图标按钮,按钮的位置和样式通过 CSS 进行了详细的定制,确保在不同屏幕大小和设备上都能良好显示和使用,以下为参考代码。
样式一,无文字有图片
.cs-image {
width: 80rpx;
height: 80rpx;
}
.contact[plain],
.share[plain] {
display: flex;
margin-right: 20rpx;
right: 0;
position: fixed;
padding: 0;
border: none;
width: 80rpx;
height: 80rpx;
}
.contact[plain] {
bottom: 18%;
}
.share[plain] {
bottom: 10%;
}
样式二,无图片有文字
客服管理
分享朋友
.bt-view,
.bt2-view {
align-items: center;
background: #1c91ff;
border: 1rpx solid #96969686;
border-bottom-left-radius: 500rpx;
border-top-left-radius: 500rpx;
box-shadow: 0 5rpx 20rpx rgba(34, 34, 34, .5);
color: #fff;
display: flex;
filter: drop-shadow(rgba(102, 102, 102, .2) 5px 5px 11px);
font-weight: 700;
height: 70rpx !important;
letter-spacing: 2rpx;
padding: 10rpx 5rpx 10rpx 20rpx;
position: fixed;
right: 0rpx;
z-index: 999;
}
.bt-view {
bottom: 230rpx;
}
.bt2-view {
bottom: 130rpx;
}
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有