gpt4 book ai didi

css - 为什么宽度不同?

转载 作者:太空宇宙 更新时间:2023-11-04 16:22:37 25 4
gpt4 key购买 nike

<style>
span {
font-family: "Fixedsys", "Courier New", Courier, mono, serif;
font-size: 14px;
background-color: #E7E5DC;
}
span{word-spacing:-10px}/*FireFox*/
*html span{word-spacing:0}/*ie6fixed*/
*+html span{word-spacing:0}/*ie7fixed*/
</style>
<div>
<span>IE&nbsp;firefox&nbsp;space&nbsp;width</span>
</div>
<div>
<span>IE firefox space width</span>
</div>

我在 FF 和 IE 中运行上面的代码,符合  在 IE 中显示与带空格的行相同宽度的空格。但在 FF 中是另一个故事。我希望上面的代码显示相同宽度的空间,  和空间,在FF中,我该怎么办?

最佳答案

尝试用

<style>
span {
font-family: "Fixedsys", "Courier New", Courier, mono, serif;
font-size: 14px;
background-color: #E7E5DC;
}
</style>
<div>
<code>
<span>IE&nbsp;firefox&nbsp;space&nbsp;width</span>
</div>
<div>
<span>IE firefox space width</span>
</code>
</div>

关于css - 为什么宽度不同?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6290683/

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