gpt4 book ai didi

html - 我怎样才能解决 Firefox 和 IE7 中明显的不一致问题?

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

当我在 Firefox4 中清除一个元素时,它会转到下一行,并且在 IE7 中,它会转到下一行而不会留下任何空格..

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
#a{border:#000 thin groove;float:left;}
#b{border:#000 thin groove;float:left;clear:left;}
</style>
</head>

<body>
<p id="a">Testing</p>
<p id="b">Testingb</p>
</body>
</html>

最佳答案

对于 p 元素,大多数浏览器现在默认的 margin-topmargin-bottom 都大于零。 Internet Explorer 没有。

添加 p { margin: 0; 到你的样式将修复它。

关于html - 我怎样才能解决 Firefox 和 IE7 中明显的不一致问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6599481/

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