这是使用vue+less写的项目:
先用js判断是是否是安卓
if(!navigator.userAgent.match(/(iPhone|iPod|ios)/i)){ // 匹配安卓this.show1px = true;
}
<li v-for="item in list" :key="item.id" :class="{'scale-1px': show1px}"></li>cssli{&.scale-1px{position: relative;margin-bottom: 18px;width: 100%;border:none !important;&:after{content: '';position: absolute;top: 0;left: 0;z-index: -1;border-bottom: 1px solid @topbar;-webkit-box-sizing: border-box;box-sizing: border-box;width: 200%;height: 200%;-webkit-transform: scale(0.5);transform: scale(0.5);-webkit-transform-origin: left top;transform-origin: left top;} }}可以改变border-bottom用来决定修改那边的边框的1像素,支持圆角