Why does a CSS border look different on Android?

后端 未结 3 1355
我在风中等你
我在风中等你 2021-01-01 21:00

I have a box with a border.

border: 1px solid #000;

I am using the following viewport setup:



        
3条回答
  •  北海茫月
    2021-01-01 21:12

    Unless you have a very good reason for it (doubtful), disabling user-zoom is a very bad idea. See user-scalable=no … Evil or Slightly Not Evil? for examples of why this is bad. It also gives some examples where user-scalable=no is perfectly acceptable.

    for a 1.5 pixel-ratio, try

    @media only screen and (-webkit-min-device-pixel-ratio: 1.5) {
      div {
        border-width: 0.75px;
      }
    }
    

提交回复
热议问题