当前位置:网站首页>移动端 1px 像素兼容性问题,实现1px 边框
移动端 1px 像素兼容性问题,实现1px 边框
2022-07-02 22:09:00 【伟笑】
我是利用伪类+定位实现的。
.div{
position: relative;
padding-top: 20px;
}
.div::before {
margin-top: 10px;
display: block;
content: '';
box-sizing: border-box;
position: absolute;
z-index: 1;
left: 0;
top: 0;
width: 100%;
height: 1px;
border-top: 1px solid #e7e8eb;
transform: scaleY(1/2);
}
当然还有其他方法:
参考:6种移动端 1px 解决方案
边栏推荐
猜你喜欢
Hanging mirror security won four global infosec awards on rsac2022
The kth largest element in the [leetcode] array [215]
Share 10 JS closure interview questions (diagrams), come in and see how many you can answer correctly
[chestnut sugar GIS] ArcScene - how to make elevation map with height
Baidu AI Cloud - create a face recognition application
[leetcode] most elements [169]
中国信通院、清华大学、腾讯安全,云原生安全产学研用强强联合!
Webrtc audio and video capture and playback examples and mediastream media stream analysis
[error record] the flutter reports an error (could not read script 'xxx\flutter\u tools\gradle\app\u plugin\u loader.gradle')
Addition, deletion, modification and query of handwritten ORM (object relationship mapping)
随机推荐
go 4種單例模式
antd组件upload上传xlsx文件,并读取文件内容
手写ORM(对象关系映射)增删改查
全面解析分享购商业模式逻辑?分享购是如何赋能企业
Local dealers play the community group purchase mode and share millions of operations
位的高阶运算
QT qsplitter splitter
go 4种单例模式
Baidu AI Cloud - create a face recognition application
數據分析學習記錄--用EXCEL完成簡單的單因素方差分析
【板栗糖GIS】arcscene—如何做出有高度的高程图
Kubernetes uses the host name to allocate the pod on the specified node
小鹏P7出事故,安全气囊未弹出,这正常吗?
To myself who is about to work
Mathematical modeling -- graph and network models and methods (I)
P1007 single log bridge
大话云原生之负载均衡篇-小饭馆客流量变大了
Dahua cloud native load balancing article - the passenger flow of small restaurants has increased
杰理之样机无触摸,拆机之后重新安装变正常【篇】
go 多线程数据搜索