CSS样式属性border: 1px;
在移动端显示很粗(超过了1px)
- 解决方案:利用伪类和CSS3的转换属性
transform
中的缩放scale
- 测试用例的html代码块
<div class='test'>
测试
</div>
- 测试用例的css样式
.test {
width: 200px;
height: 200px;
position: relative;
&:after {
content: '';
display: block;
width: 200%;
height: 200%;
border: 1px solid #000;
transform: scale(.5);
transform-origin: 0 0;
position: absolute;
left: 0;
top: 0;
}
}