gpt4 book ai didi

javascript - IE 中的宽度必须比 ff 和 ch 多 2 px

转载 作者:太空宇宙 更新时间:2023-11-04 15:46:14 24 4
gpt4 key购买 nike

您好,我正在写一个 Web 计算器,在 ie 中主 div 的宽度需要比在 ff 和 ch 中多 2 px,这使得它在 ff 和 ch 中看起来有点松散,或者在 ie 中完全损坏。 here's a link to the calc和一个 jsFiddle .如果有人可以帮助我减少这两个像素(#main{width: 186px;} 是我不想得到的)或者至少让按钮在所有浏览器中均匀分布,那将会很有帮助。提前致谢。

最佳答案

使用 IE hack ?

有点像

<!--[if lte IE 8]>
<style type="text/css">
#main {
width: 188px !important;
}
</style>
<![endif]-->

在此处为 IE 的最高版本 8(可更改)添加 head 标记,并在您的 css 文件中将您的 css 恢复为 186px。

这有点作弊,但如果你不介意的话......

关于javascript - IE 中的宽度必须比 ff 和 ch 多 2 px,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11717255/

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