gpt4 book ai didi

html - CSS 样式 Firefox/Safari/Chrome

转载 作者:太空狗 更新时间:2023-10-29 16:38:11 25 4
gpt4 key购买 nike

我对浏览器之间的 CSS 差异有疑问。我有一个简单的输入文本字段和一个提交按钮。应该安排。使用 webkit (safari/webkit) 一切看起来都很好,但 firefox 不这样做。有谁知道出了什么问题吗?

我写了一个小的测试 html 页面:

<html>
<head>
<style type="text/css">

#input {
background: none repeat scroll 0 0 white;
border-color: #DCDCDC;
border-style: solid;
border-width: 1px 0 1px 1px;
font: 13px "Lucida Grande",Arial,Sans-serif;
margin: 0;
padding: 5px 5px 5px 15px;
width: 220px;
outline-width: 0;
height: 30px;
}

#submit {
background: none repeat scroll 0 0 white;
border: 1px solid #DCDCDC;
font: 13px "Lucida Grande",Arial,Sans-serif;
margin: 0;
outline-width: 0;
height: 30px;
padding: 5px 10px;
}

</style>
</head>
<body>
<input id="input" type="text" value="" /><input id="submit" type="button" value="Add" />
</body>
</html>

最佳答案

您没有使用 Doctype,因此浏览器回退到 quirks mode :

In the Quirks mode the browsers violate contemporary Web format specifications in order to avoid “breaking” pages authored according to practices that were prevalent in the late 1990s. Different browsers implement different quirks. In Internet Explorer 6, 7 and 8, the Quirks mode is effectively frozen IE 5.5. In other browsers, the Quirks mode is a handful of deviations from the Almost Standards mode.

关于html - CSS 样式 Firefox/Safari/Chrome,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2940238/

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