当前位置:网站首页>选择商品属性弹框从底部弹出动画效果
选择商品属性弹框从底部弹出动画效果
2022-07-07 03:12:00 【要成为光的女人】

以上就是我们选择商品时,会出现一个动画效果模态弹框,相关代码的实现如下:
视图层的代码:
<!-- 底部弹出规格选择 -->
<view class="animation" wx:if="{
{showView}}">
<!-- 内容框 -->
<view class="animation_content">
<!-- 上部分 -->
<view class="animation_content_top">
<view class="pic">
<image src="{
{goods_detail.points_goods_image}}" mode="aspectFit"></image>
</view>
<view class="store_name">
<view style="margin-bottom: 10px;">{
{goods_detail.points_goods_name}}</view>
<view style="color: red;">帮豆{
{goods_detail.points_goods_points}} + <text style="font-size: 25rpx;">现金:{
{goods_detail.points_goods_buyprice}}</text></view>
</view>
<view class="close_kucun">
<icon class="iconfont icon-close c-c6" bindtap='off'></icon>
<view style="font-size: 27rpx;color: #999;">库存:{
{goods_detail.points_goods_storage}}</view>
</view>
</view>
<!-- 下部分 -->
<view class="animation_content_bottom">
<view style="width: 20%;">购买数量</view>
<view class="nums">
<button bindtap="cut"> - </button>
<view>{
{num}}</view>
<button bindtap="addition"> + </button>
</view>
<view>
</view>
</view>
<!-- 立即兑换 -->
<button style="background: #fe244b;color: #fff;font-size: 28rpx;" bindtap="buyNow">立即兑换</button>
</view>
</view>css相关的样式
/* 底部弹框动画 */
.animation{background: rgba(0,0,0,.5);position: fixed;width: 100%;top: 0;right: 0;animation: animation 1s ease;height: 100%;z-index: 3;}
@keyframes animation{
0%{position: fixed;width: 100%;top:500rpx;right: 0;}
100% {position: fixed;width: 100%;bottom:0;right: 0;height: 100%;}
}
.animation_content{
display: block;
position: absolute;
bottom:0 ;
z-index: 4;
width: 100%;
background: #ffff;
}
.animation_content_top{
padding: 18px 10px;
box-sizing: border-box;
border-bottom: 1rpx solid #999;
display: flex;
justify-content: space-between;
margin-bottom: 85px;
}
.store_name{margin-left: 30%;font-size: 27rpx;}
.close_kucun{display: flex;flex-direction: column;align-items: flex-end;}
.close_kucun icon{margin-top: -18px;margin-bottom: 18px;}
.animation_content_top .pic{width: 95px;height: 95px;border-radius: 10px;position: absolute;top: -25px;}
.pic image{width: 100%;height: 100%;border-radius: 10px;}
.animation_content_bottom {
border-top: 1rpx solid #9999;
padding: 10px;
display: flex;
justify-content: space-between;
color: #999;
font-size: 28rpx;
font-weight: 400;
}
.animation_content_bottom .nums{width: 20%;display: flex;align-items: flex-end;margin-left: 50%;}
.animation_content_bottom button{width: 40rpx;height: 40rpx;line-height: 40rpx;}
.bottom_duihuan{background: #fe244b;color: #fff;font-size: 30rpx;position: fixed;width: 100%;bottom: 0;left: 0;right: 0;height: 80rpx;line-height: 80rpx;}
边栏推荐
- Multidisciplinary integration
- SolidWorks GB Library (steel profile library, including aluminum profile, aluminum tube and other structures) installation and use tutorial (generating aluminum profile as an example)
- Answer to the first stage of the assignment of "information security management and evaluation" of the higher vocational group of the 2018 Jiangsu Vocational College skills competition
- 【NOI模拟赛】区域划分(结论,构造)
- MYSQL----导入导出&视图&索引&执行计划
- Jetpack compose is much more than a UI framework~
- Please tell me how to monitor multiple schemas and tables by listening to PgSQL
- 从零到一,教你搭建「CLIP 以文搜图」搜索服务(二):5 分钟实现原型
- How DHCP router works
- 数据资产管理与数据安全国内外最新趋势
猜你喜欢

ip地址那点事

JWT的基础介绍

2022年全国所有A级景区数据(13604条)

Leetcode T1165: 日志分析

MySQL SQL的完整处理流程

main函数在import语句中的特殊行为

Graduation design game mall

Answer to the second stage of the assignment of "information security management and evaluation" of the higher vocational group of the 2018 Jiangsu Vocational College skills competition

Matlab tips (29) polynomial fitting plotfit

MATLAB小技巧(30)非线性拟合 lsqcurefit
随机推荐
Mysql---- import and export & View & Index & execution plan
【JDBC以及内部类的讲解】
华为机试题素数伴侣
from . onnxruntime_ pybind11_ State Import * noqa ddddocr operation error
Take you to brush (niuke.com) C language hundred questions (the first day)
带你刷(牛客网)C语言百题(第一天)
2018年江苏省职业院校技能大赛高职组“信息安全管理与评估”赛项任务书第一阶段答案
FPGA课程:JESD204B的应用场景(干货分享)
The latest trends of data asset management and data security at home and abroad
【mysqld】Can't create/write to file
Please tell me how to monitor multiple schemas and tables by listening to PgSQL
How Oracle backs up indexes
How to share the same storage among multiple kubernetes clusters
请问 flinksql对接cdc时 如何实现计算某个字段update前后的差异 ?
Redhat5 installing vmware tools under virtual machine
How DHCP router works
健身房如何提高竞争力?
算法---比特位计数(Kotlin)
From zero to one, I will teach you to build the "clip search by text" search service (2): 5 minutes to realize the prototype
请教一个问题,flink oracle cdc,读取一个没有更新操作的表,隔十几秒就重复读取全量数据