简体   繁体   English

它是Chrome中em DIV的秘密最小尺寸(宽度/高度)吗?

[英]Is it a secret minimal size(width/height) of em DIV in Chrome?

I have a div with width & height in em. 我有一个宽度和高度为div的div。 It regulated by the font-size of its parent div. 它由其父div的字体大小调节。

When I set the font-size of the parent less than 6px it doesn't change. 当我设置父级的字体大小小于6px时,它不会改变。 Before and in Firefox it works as it should be. 在Firefox之前和之中它应该是可行的。

MacOS, Chrome Version 74.0.3729.131 (Official Build) (64-bit) MacOS,Chrome版本74.0.3729.131(官方版)(64位)

Here is an example, it will be the same size, even it is 6px and 2px: 这是一个例子,它将是相同的大小,即使它是6px和2px:

 <div style="font-size: 6px"> <div style="height: 10.36em; width: 10.2em; border: 1px solid red;"><span style="font-size:2em">text</span></div> </div> 

 <div style="font-size: 2px"> <div style="height: 10.36em; width: 10.2em; border: 1px solid red;"><span style="font-size:2em">text</span></div> </div> 

That's how I see it: 我就是这样看的: 在此输入图像描述

Why and how to fix it? 为什么以及如何解决它?

PS so it looks like it is a bug, I reported it here: https://bugs.chromium.org/p/chromium/issues/detail?id=963414 PS所以它看起来像是一个bug,我在这里报告: https//bugs.chromium.org/p/chromium/issues/detail?id = 963414

It's because Chrome has “minimum font size” setting which is 6px by default. 这是因为Chrome的“最小字体大小”设置默认为6px。 It is better to write about this Chrome setting. 最好写一下这个Chrome设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM