gpt4 book ai didi

css - 你如何在 IE6 中使
小于 13px?

转载 作者:行者123 更新时间:2023-11-28 10:07:20 24 4
gpt4 key购买 nike

如何在 IE6 中使 DIV 非常短?无论我使用 0.3em 还是 3px,IE6 都会强制最小为 13px。

IE6

IE6

Firefox 3.6.13(在所有其他现代浏览器中看起来非常相似)

FF

HTML

<div id="fileProgressBar" style="display:none">
<div id="fileProgressFill"></div>
</div>

CSS

#fileProgressBar {
height: 0.3em;
background: #444;
background: -moz-linear-gradient(
top,
#333,
#666
);
background: -webkit-gradient(
linear,
left top,
left bottom,
color-stop(0, #333),
color-stop(1, #666)
);
border-top: 1px solid #000;
}

#fileProgressFill {
height: 100%;
width: 0;
background: #0088cc;
background: -moz-linear-gradient(
top,
#0099e5,
#006699
);
background: -webkit-gradient(
linear,
left top,
left bottom,
color-stop(0, #0099e5),
color-stop(1, #006699)
);
}

Javascript

Javascript 在适当的时候显示文件进度条,并在电影播放时更新文件进度填充。但是这个bug不是JS问题,所以我就不贴JS代码了。

最佳答案

原来我把这个复杂化了一点:

只是做:

#fileProgressBar {
height: 3px;
font-size: 0;
..
}

要在 IE6 中修复它,请在 #fileProgressBar 中添加 font-size: 3px。然而,这使得它在普通浏览器中看起来是错误的。因此,最简单的解决方法是在 conditional comment 中应用该样式。 ,或者像这样添加它,使用 CSS hack (幸运的是确实验证了)所以只有 IE6 可以看到它:

* html #fileProgressBar {
font-size: 3px
}

我会看看是否有更简洁的方法来解决这个问题。

关于css - 你如何在 IE6 中使 <div> 小于 13px?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4799419/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com