<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
Table of contents Preface Prepare Summarize n way...
<br />I have summarized the annotation writi...
Usually in project development, we have to deal wi...
Table of contents Installation package download I...
Table of contents Project Creation Project Struct...
Preface What is state We all say that React is a ...
This article shares the specific code for JavaScr...
Overview Volume is the abstraction and virtualiza...
Table of contents Create a vue + ts project using...
The “Cancel” button is not part of the necessary ...
1. Download MySQL Log in to the MySQL official we...
System environment: centos7.4 1. Check whether th...
Step 1: Add a secondary domain name to the Alibab...
What is JSX JSX is a syntax extension of Javascri...
Table of contents 2. Purpose 2.1 Adding propertie...