css 移动端1px的解决方案
2017-06-22 16:37
253 查看
.wi-cell { position: relative; } .wi-cell:before { content: " "; position: absolute; left: 0; top: 0; right: 0; height: 1px; border-top: 1px solid #e5e5e5; color: #e5e5e5; -webkit-transform-origin: 0 0; transform-origin: 0 0; -webkit-transform: scaleY(0.5); transform: scaleY(0.5); left: 15px; }
原理:父级设置相对定位,通过伪类来给父级添加子元素设置相对于父级的绝对定位,设置其高为一个像素,然后设置上边框也为一个像素,最后通过 CSS3 的 transform 属性把伪元素缩放为原来的一半大小。
相关文章推荐
- IOS移动端1px解决方案
- 解决CSS移动端1px边框问题
- 移动端视网膜(Retina)屏幕下1px边框线 解决方案
- 移动端关于select最佳兼容性解决方案(css)
- 移动端1px直线解决方案
- 移动端1px边框的解决方案
- 移动端1px解决方案
- 移动端视网膜(Retina)屏幕下1px边框线 解决方案 -- 不错 保留
- 移动端 Retina屏 各大主流网站1px的解决方案
- 移动端1px解决方案
- 移动端1px解决方案
- 解决CSS移动端1px边框问题
- 移动端基础知识(像素+1px边框+css长度值)
- 1px物理像素,js移动端; css三角形
- 移动端关于select最佳兼容性解决方案(css)
- 手机移动端可滚动的导航代码--css解决方案
- 移动端1px细线解决方案总结
- 移动端关于select最佳兼容性解决方案(css)
- 关于移动端web 1px边框解决方案
- 移动端1px解决方案