*新闻详情页*/>
css动漫的1个运用,与此前的css走马灯一样的內容。只是1次不一样的运用,实际完成以下
<template> <section> <div class="box"> <ul class="header"> <li class="cell">编号</li> <li class="cell">名字</li> <li class="cell">年纪</li> <li class="cell">性別</li> <li class="cell">技术专业</li> </ul> <div class="body"> <ul class="list"> <li v-for="(item, index) in arr" :key="index" class="row" > <span class="cell">{{ item }}</span> <span v-for="(n) in 4" :key="n*30" class="cell">{{ n }}</span> </li> </ul> </div> </div> </section> </template> <script> export default { data() { return { arr: [], } }, created() { this.arr = Array.from(new Array(20), (v, k) => { return k + 1 }) // 报表显示信息5行数据信息,此处拷贝开始的5条数据信息完成无缝拼接 this.arr = this.arr.concat(this.arr.slice(0, 5)) } } </script> <style lang="scss"> $cellHeight: 30px; ul { list-style: none; margin: 0; padding: 0; } .box { width: 60%; margin: auto; } .header { display: flex; } .body { height: 5 * $cellHeight; overflow: hidden; // padding-bottom: 10px; li { display: flex; height: $cellHeight; } } .cell { flex: 1; height: $cellHeight; line-height: $cellHeight; border: 1px solid #e2e2e2; box-sizing: border-box; } .list { animation: scroll 10s linear infinite; position: relative; } @keyframes scroll { from { top: 0; } to { top: ⑵0 * $cellHeight } } </style>
总结
到此这篇有关根据css动漫完成1个报表翻转轮播实际效果的文章内容就详细介绍到这了,更多有关css 动漫报表翻转轮播內容请检索脚本制作之家之前的文章内容或再次访问下面的有关文章内容,期待大伙儿之后多多适用脚本制作之家!
Copyright © 2002-2020 公众号小程序_小程序正规价格表_微信群签到小程序_网络抽签小程序_个人做小程序需要什么 版权所有 (网站地图) 粤ICP备10235580号