一说到0.5px的边框,我们一般认为是不行的,因为在ps中0.5px的线也是做不出来的,这个计算机的像素有关系。

废话不多说了,0.5px 其实用的是css3新特性,box-shadow:阴影设置

代码

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
</head>
<body>
<div style="margin-top: 10px;border:1px solid #f00;width: 100px; height: 20px;">1px 红色的边框</div>
<div style="margin-top: 10px;width: 100px;height: 20px;box-shadow:0.5px 0.5px #f00 ,0.5px 0.5px #f00 inset">
0.5px 红色的边框
</div>
</body>
</html>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2018-05-06
  • 2019-11-03
  • 2021-08-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
  • 2021-07-07
相关资源
相似解决方案