赞
踩
xy轴给与初始位置
可以自己封装成组件
- <!-- x,y轴 -->
- <movable-area class="movableArea">
- <movable-view class="movableView" direction="all" x="650rpx" y="800rpx">
- <image src="图片.png" mode="widthFix"></image>
- <button open-type='contact' class="btn">在线客服</button>
- <text style="color: #fff;font-size: 15rpx;margin-top: 5rpx;">在线客服</text>
- </movable-view>
- </movable-area>
-
- <!-- css -->
-
- .movableArea {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- pointer-events: none;
- z-index: 99;
-
- .movableView {
- pointer-events: auto;
- width: 100rpx;
- height: 100rpx;
- display: flex;
- align-items: center;
- justify-content: center;
-
- image {
- width: 100%;
- height: 100%;
- }
- // 客服
- .btn {
- width: 50px;
- height: 50px;
- overflow: hidden;
- position: absolute;
- left: 0px;
- top: 0px;
- border-radius: 100%;
- opacity: 0;
- }
-
- }
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。