当前位置: 首页 > news >正文

WordPress开网站很慢/站长之家收录查询

WordPress开网站很慢,站长之家收录查询,网页设计导航,上海高端模板建站蛇形时间轴 实现思路视图代码逻辑代码样式代码 实现思路 蛇形排列&#xff0c;奇数列设定左边框&#xff0c;偶数列设定右边框且内容反转显示 激活的色调为蓝&#xff0c;否则为灰 行-列-当前激活可以动态设定 视图代码 <template><div class"timelinebox&qu…

蛇形时间轴

  • 实现思路
  • 视图代码
  • 逻辑代码
  • 样式代码

实现思路

蛇形排列,奇数列设定左边框,偶数列设定右边框且内容反转显示
激活的色调为蓝,否则为灰
行-列-当前激活可以动态设定
在这里插入图片描述

视图代码

<template><div class="timelinebox"><!-- 行设置,奇数行设置左边框,偶数行设置右边框,为了实现蛇形排列,偶数行需反转显示 --><!-- 经过的时间轴变蓝,未过为灰 根据激活的值为行动态的添加.on的class样式, --><div class="timeline" v-for="row in rows" :key="row":class="{ 'reverse': row % 2 === 0, 'on': row - 1 < activeIndex / cols }"><!-- 列设置,动态的计算列宽 改变激活的颜色,动态的添加.active --><div class="timelineItem" v-for="item in cols" :key="item":class="{ 'active': (row - 1) * cols + item <= activeIndex }" :style="{ width: (100 / cols) + '%' }"><!-- 文本的标题一行,显示不下的... 注意子元素必须绝对定位,父相对定位,否则...不起作用,且错位乱版 --><div class="itemTitle"><div class="ellipsis">{{ (row - 1) * cols + item }}项的标题<span v-if="row > 1 && row < 4">内容细节与详情</span></div></div><div class="itemDot"></div></div></div></div>
</template>

逻辑代码

<script setup>
// 行数
let rows = 13
// 列数
let cols = 6
// 当前激活的数 等于当前行数-1*列数+当前列数
let activeIndex = 10
</script>

样式代码

<style scoped lang="scss">
.timelinebox {width: 100%;height: 100%;padding: 20px;box-sizing: border-box;display: block;position: relative;overflow-y: auto;.timeline {width: 100%;height: 80px;display: flex;justify-content: start;border-left: 5px solid gray;.timelineItem {height: 100%;border-bottom: 5px solid gray;display: flex;flex-direction: column;justify-content: end;align-items: center;cursor: default;position: relative;.itemTitle {position: absolute;bottom: 10px;left: 0px;width: 100%;box-sizing: border-box;padding: 10px;text-align: center;font-size: 18px;overflow: hidden;}.itemDot {width: 20px;height: 20px;background-color: gray;border-radius: 10px;margin-bottom: -12px;display: block;}}.timelineItem.active {border-color: blue;.itemTitle {color: blue;}.itemDot {background-color: blue;}}}.timeline.reverse {flex-direction: row-reverse;justify-content: end;border-right: 5px solid gray;border-left: 0px;}.timeline.on {border-color: blue;}.timeline:first-child {border: 0}
}
</style>
http://www.whsansanxincailiao.cn/news/30337788.html

相关文章:

  • 国内谷歌网站SEO优化/发软文是什么意思
  • 专门做中文音译歌曲的网站/seo视频教学网站
  • 谷歌网站推广报价/html网页制作
  • android开发/四川seo哪里有
  • 怎么做网站发布/优化大师app下载安装
  • 做网站月入过万/抖音关键词挖掘工具
  • 河北云建站/软文推广公司有哪些
  • 大连做网站绍兴厂商/seo查询 站长工具
  • 盐城建设公司网站/搜索引擎优化的基础是什么
  • 苏州小程序/班级优化大师使用指南
  • 网站建设课程设计报告/买外链网站
  • 智慧树网页设计与制作作业答案/seo sem是什么职位
  • 金融投资网站方案/如何网络推广新产品
  • 玫琳凯网站建设与推广方案/网站编辑seo
  • 网站制作北京海淀/优化品牌seo关键词
  • 链家准备做贝壳网站/搜索引擎优化的名词解释
  • 做视频网站要什么格式好/营销型网站建设易网拓
  • 周口seo 网站/做个公司网站大概多少钱
  • 移动版网站怎么做/网络推广的含义
  • 网站域名劫持/建站教程
  • 贵州省城市建设厅网站/关键词工具软件
  • 青海建设厅通报网站/网站优化策略分析
  • 用git 做网站/搜索关键词然后排名怎样提升
  • 网站项目策划方案/无锡百度快速优化排名
  • 龙岩建网站/网站快速优化排名排名
  • 网站建设的开多少税率/浙江关键词优化
  • 网站空间多大合适/信息流推广的竞价机制是
  • 动态网站建设/友链交换平台
  • 如何设计网页模板/seo排名工具给您好的建议
  • 深圳高端设计网站/外贸谷歌推广