android autofit mode causing issues with css width in web page

前端 未结 13 1548
挽巷
挽巷 2020-12-13 10:49

I am having problems with the auto resize feature of the android browser. The widths on my site are going a bit haywire when the device is in portrait mode.

What I w

13条回答
  •  悲&欢浪女
    2020-12-13 11:18

    I simply add a transparent png image as a repeated background. This also works for H1, H2, H3... tags that seem to be plagued by the same narrow-column problem. By using a transparent png, it allows me to still assign a background color or show whatever is behind the element. This is not perfect, but it is the simplest solution I have found that does not rely on any browser-specific hack and seems to work well in all other mobile browsers I have seen.

    Although, I have noticed the same behavior on SPAN tags as well, and the above does not seem to work for this element... weird!

提交回复
热议问题