vue實(shí)現(xiàn)橫向時間軸
更新時間:2022年02月27日 16:08:40 作者:kurcp
這篇文章主要為大家詳細(xì)介紹了vue實(shí)現(xiàn)橫向時間軸,文中示例代碼介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們可以參考一下
本文實(shí)例為大家分享了vue實(shí)現(xiàn)橫向時間軸的具體代碼,供大家參考,具體內(nèi)容如下
1、效果圖
2、代碼實(shí)現(xiàn)
html
<template> ? <div class="timeaxis" > ? ? <div v-for="item in list" :key="item.index"> ? ? ? <div class="box"> ? ? ? ? <div class="item"> ? ? ? ? ? <div class="left">{{item.warnname}}</div> ? ? ? ? ? <div class="center">{{item.condation}}</div> ? ? ? ? </div> ? ? ? ? <div class="circular"></div> ? ? ? ? <div class="item2"> ? ? ? ? ? <div class="bottom">{{item.standard}}</div> ? ? ? ? </div> ? ? ? </div> ? ? </div> ? </div> </template> <script> export default { ? data(){ ? ? return { ? ? ? ? //數(shù)據(jù) ? ? ? list:[ ? ? ? ? { ? ? ? ? ? ? ? warnname: "一級預(yù)警", ? ? ? ? ? ? ? condation: "60", ? ? ? ? ? ? ? standard: 18, ? ? ? ? ? ? ? median: 5, ? ? ? ? ? ? }, ? ? ? ? ? ? { ? ? ? ? ? ? ? warnname: "二級預(yù)警", ? ? ? ? ? ? ? condation: "30", ? ? ? ? ? ? ? standard: 15, ? ? ? ? ? ? ? median: 5, ? ? ? ? ? ? }, ? ? ? ? ? ? { ? ? ? ? ? ? ? warnname: "三級預(yù)警", ? ? ? ? ? ? ? condation: "15", ? ? ? ? ? ? ? standard: 22, ? ? ? ? ? ? ? median: 5, ? ? ? ? ? ? }, ? ? ? ] ? ? } ? } } </script>
css樣式
<style scoped lang='less'> .timeaxis{ ? width: 800px; ? height: 200px; } .box{ ? float: left; ? width: 180px; } .circular{ ? border: 2px solid #67c23a; ? width: 10px; ? height: 10px; ? border-radius: 10px; ? background: white; ? margin: auto; ? margin-bottom: -4px; ? position: relative; ? top: -8px; ? left: 85px; } .item{ ? border-bottom: 1px solid #409eff; ? position: relative; ? .left{ ? ? position: absolute; ? ? left: 55px; ? ? top: -25px; ? } ? .center{ ? ? position: absolute; ? ? left: 165px; ? ? top: -26px; ? } } .item2 { ? position: relative; ? ? .bottom{ ? ? position: absolute; ? ? left: 75px; ? ? top: 0px; ? } } </style>
以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
相關(guān)文章
在vue-cli搭建的項(xiàng)目中增加后臺mock接口的方法
這篇文章主要介紹了在vue-cli搭建的項(xiàng)目中增加后臺mock接口的方法,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2018-04-04基于vue-simplemde實(shí)現(xiàn)圖片拖拽、粘貼功能
這篇文章主要介紹了基于vue-simplemde實(shí)現(xiàn)圖片拖拽、粘貼功能,需要的朋友可以參考下2018-04-04基于Vue實(shí)現(xiàn)圖片在指定區(qū)域內(nèi)移動的思路詳解
這篇文章主要介紹了基于Vue實(shí)現(xiàn)圖片在指定區(qū)域內(nèi)移動,本文通過實(shí)例代碼給大家介紹的非常詳細(xì),具有一定的參考借鑒價值,需要的朋友可以參考下2018-11-11vue translate peoject實(shí)現(xiàn)在線翻譯功能【新手必看】
這篇文章主要介紹了vue translate peoject實(shí)現(xiàn)在線翻譯功能,非常不錯,具有一定的參考借鑒價值,需要的朋友可以參考下2018-06-06