您的位置:首页 > 文旅 > 美景 > 北京网络营销公司网页_java web开发要学什么_手机百度下载_aso优化报价

北京网络营销公司网页_java web开发要学什么_手机百度下载_aso优化报价

2025/4/22 19:34:12 来源:https://blog.csdn.net/qq_43764578/article/details/147274375  浏览:    关键词:北京网络营销公司网页_java web开发要学什么_手机百度下载_aso优化报价
北京网络营销公司网页_java web开发要学什么_手机百度下载_aso优化报价

效果图

请添加图片描述

.wxml

<view class="container"><view class="container-num" wx:for="{{number}}" wx:key="index"><view class="num-container" style="--h:{{h}}px;--y:{{-item * h }}px;"><view wx:for="{{10}}" wx:key="index" class="num-item">{{index}}</view></view></view>
</view>
<button bind:tap="getRandomNum">生成随机数</button>

.js

Page({data: {number:'0',h:30,},getRandomNum(){const num = `${Math.floor(Math.random() * 1000)}`;this.setData({number:num})}
})

.wxss

.container{padding: 100rpx 0;display: flex;justify-content: center;
}
.container-num{overflow: hidden;
}
.num-container{height: var(--h);transform:translateY(var(--y));transition-duration: 1s;margin: 0 1px;
}
.num-item{height: var(--h);flex-direction: column;display: flex;align-items: center;justify-content: center;
}

遇到问题可以看我主页加我Q,很少看博客,对你有帮助别忘记点赞收藏。

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com