<template> <ul class="container"> <li v-for="(item,index) in datalist" :key="index"> {{item.text}}<span></span> </li> </ul> </template> <script> export default{ props:{}, data(){ return { datalist:[ { id:1, text:'Shandong' }, { id:2, text:'Beijing' }, { id:3, text:'Shaanxi' }, { id:4, text:'Chongqing' } ] } }, components:{}, methods:{}, mounted(){}, created(){}, watch:{} } </script> <style scoped lang="scss"> .container{ display: flex; li{ position: relative; width: 40px; height: 20px; font-size: 14px; font-weight: 300; text-align: center; line-height: 20px; span{ display: inline-block; position: absolute; width: 1px; height: 50%; right: 0; top: 50%; transform: translateY(-50%); background-color: #EEEEEE; } &:last-child{ //Note here, the method to eliminate the last gray line span{ width: 0; } } } } </style> You may also be interested in:
|
<<: Docker renames the image name and TAG operation
>>: A brief analysis of SQL examples for finding uncommitted transactions in MySQL
I have been studying how to get https. Recently I...
Recently, when I was working on CSS interfaces, I...
Environment Introduction: Ubuntu Server 16.04.2+M...
Today, when learning PHP, of course, you have to ...
Preface Fix the footer area at the bottom. No mat...
Lists are used to list a series of similar or rela...
Preface: The most commonly used MySQL logical bac...
It is difficult to find good image material websi...
Table of contents Basic application of javascript...
What is nGrinder? nGrinder is a platform for stre...
Event loop in js Because JavaScript is single-thr...
As a software developer, you must have a complete...
Table of contents Preface optimization Extract va...
Which parameter does the rpm command use to insta...
Problem description: Recently, there is a demand ...