开发者

HR Height 1px not working

开发者 https://www.devze.com 2023-03-25 14:57 出处:网络
<hr style=\"height: 1px; border: none; color: #000000; background-color: #000000; padding: 0px; margin: 0px; width: 20px; font-s开发者_如何转开发ize: 0px; line-height: 1px;\">
<hr style="height: 1px; border: none; color: #000000; background-color: #000000; padding: 0px; margin: 0px; width: 20px; font-s开发者_如何转开发ize: 0px; line-height: 1px;">

I also tried

<div style="background-color: #000000; height: 1px; width: 20px;"></div>

On some devices all the lines are 1px... on my android... on landscape they're all 1px too but on portrait some lines are 1px and some are 2px... And if I scroll they don't change so its not the screen doing it. I'm so confused, can someone explain this to me?


Some android devices like HTC desire don't have the some number of real pixels that is configured to be. It's like 800x 480 but the real pixels are less in numbers. so 2px in the real device might be 1px (because it's larger , smaller physical dpi). On android don't "play" with pixels. Play with density points (http://developer.android.com/guide/practices/screens_support.html , but still on some devices the problem might persist)

0

精彩评论

暂无评论...
验证码 换一张
取 消