vue實(shí)現(xiàn)橫向時(shí)間軸
本文實(shí)例為大家分享了vue實(shí)現(xiàn)橫向時(shí)間軸的具體代碼,供大家參考,具體內(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: "一級(jí)預(yù)警",
? ? ? ? ? ? ? condation: "60",
? ? ? ? ? ? ? standard: 18,
? ? ? ? ? ? ? median: 5,
? ? ? ? ? ? },
? ? ? ? ? ? {
? ? ? ? ? ? ? warnname: "二級(jí)預(yù)警",
? ? ? ? ? ? ? condation: "30",
? ? ? ? ? ? ? standard: 15,
? ? ? ? ? ? ? median: 5,
? ? ? ? ? ? },
? ? ? ? ? ? {
? ? ? ? ? ? ? warnname: "三級(jí)預(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>以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
相關(guān)文章
在vue-cli搭建的項(xiàng)目中增加后臺(tái)mock接口的方法
這篇文章主要介紹了在vue-cli搭建的項(xiàng)目中增加后臺(tái)mock接口的方法,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2018-04-04
基于vue-simplemde實(shí)現(xiàn)圖片拖拽、粘貼功能
這篇文章主要介紹了基于vue-simplemde實(shí)現(xiàn)圖片拖拽、粘貼功能,需要的朋友可以參考下2018-04-04
基于Vue實(shí)現(xiàn)圖片在指定區(qū)域內(nèi)移動(dòng)的思路詳解
這篇文章主要介紹了基于Vue實(shí)現(xiàn)圖片在指定區(qū)域內(nèi)移動(dòng),本文通過實(shí)例代碼給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2018-11-11
vue translate peoject實(shí)現(xiàn)在線翻譯功能【新手必看】
這篇文章主要介紹了vue translate peoject實(shí)現(xiàn)在線翻譯功能,非常不錯(cuò),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2018-06-06
vue中npm如何設(shè)置倉(cāng)庫(kù)地址
在使用npm命令時(shí),如果直接從國(guó)外的倉(cāng)庫(kù)下載依賴,下載速度很慢,甚至?xí)螺d不下來,我們可以更換npm的倉(cāng)庫(kù)源,提高下載速度,這篇文章主要給大家介紹了關(guān)于vue中npm如何設(shè)置倉(cāng)庫(kù)地址的相關(guān)資料,需要的朋友可以參考下2023-12-12

