how to override font boosting in mobile chrome

后端 未结 8 1089
面向向阳花
面向向阳花 2020-12-01 09:32

Is it possible to override font boosting in mobile chrome? I searched the internet before ~including stackoverflow~.

I found that some people say it\'s impossible, a

相关标签:
8条回答
  • 2020-12-01 10:19

    Android Chrome only applies font boosting to elements with dynamic height. As soon as you specify a height,max-height or line-height, font boosting is not applied. But you should be careful of the inline element like span whose height or max-height property is invalid. In that case you can set the display to inline-block as the below code or other box types whose height can be setted.
    span { font-size:12px; line-height:12px; display:inline-block; }

    0 讨论(0)
  • 2020-12-01 10:20

    Matt and Kundan Sankhe answer are the best solution at the moment.

    .element { max-height: 999999px; }
    

    If the problem still occur try add this inside the head tag:-

    <meta name="viewport" content="width=device-width, initial-scale=1">
    

    But bear in mind that this can cause problem to image tag or image background-size tag.

    0 讨论(0)
提交回复
热议问题