css - 微博手机网页端是如何实现1px边框的
伊谢尔伦
伊谢尔伦 2017-04-17 13:41:40
0
6
486

微博手机网页端是如何实现1px边框的?

正常写手机版网页1px在高分屏上通常都不止1个像素
但是打开微博网页版,消息、我,这两页边框都是真正的1个像素,请问如何实现的。

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(6)
PHPzhong

You can read the question I asked that day. My final solution is as follows. To determine if the mobile phone has modified the viewport on the car, there is no code. You can refer to the Lianjia mobile version to check the js of the meta string in the head.

http://jinlong.github.io/2015...

Peter_Zhu

You can use the background image directly without setting a border

大家讲道理

Use transform's scale

border-bottom: 1px solid #D5D5D6
transform:scaleY(0.5);
刘奇

Several ways to achieve it

https://codepen.io/yangg/pen/...

PHPzhong

Set a pseudo element with a width and height of 200%, set its border to 1px, and then use CSS3 to double the size. This can reduce the border to 0.5px at the same time. The same goes for other single-sided borders

Ty80

The more popular (reliable) method now is to use pseudo elements to draw lines, and then transform: scale (0.5)
You can refer to WeChat’s weui, all borders in it are written like this
WeChat official has written this, so it should be no problem

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template