我有一个简单的布局, Logo 在 Firefox 中似乎有所不同,而且我似乎无法在所有浏览器中获得均匀的介质,因为当我更改蓝色框中字母“f”的高度时,它会影响所有浏览器浏览器。
我遇到的问题是 div“logofoxfont”,因为我希望字母“f”在所有浏览器中都处于相同位置,但它在 firefox 中似乎有所不同。
我该如何排序?
<html>
<head>
</head>
<link href="fw.css" rel="stylesheet" type="text/css">
<body>
<div class="topbox">
<div class="logobox"><div class="logoboxfont">
f</div></div>
<div class="logotext"></div>
</div>
<div class="midbox">
<div class="menubox"><div class="menuboxfont">Home<br>About Us<br>Staff<br>News<br></div>
<div class="menubox2"><div class="menuboxfont2">Appointments<br>
Price Guide<br>Emergency Services<br>Feedback<br></div></div></div>
</div>
</body>
</html>
CSS 是:
#logo{
background-image:url(40.jpg);
height:100px;
width:100px;
}
.topbox {
margin: 0px auto;
height:100px;
width:900px;
margin-top:0px;
background: #ffffff;
}
.logobox {
height:90px;
width:70px;
margin-top:10px;
background-color:#2FB2F4;
}
.logotext {
color: #333333;
font-family: Cambria;
font-size: 18px;
margin-top: -90px;
margin-left: 75px;
position:absolute;
}
#logotext1 {
margin-left:10px;
}
#logotext2 {
color: #00AAF5;
font-family: georgia;
font-size: 22px;
margin-top: -35px;
margin-left:10px;
}
.logoboxfont {
font-family:Cambria;
color: #ffffff;
font-size: 126px;
position:absolute;
margin-top:-20px;
margin-left:0px;
-moz-transform:rotate(10deg);
-webkit-transform:rotate(10deg);
-o-transform:rotate(10deg);
-ms-transform:rotate(10deg);
}
.midbox {
margin: 0px auto;
height:700px;
width:900px;
margin-top:0px;
background: #ffffff;
border-top: 1px solid #333333;
}
.menubox {
height:230px;
width:150px;
margin-top:10px;
background: #E6E6E6;
}
.menuboxfont {
color: #333333;
font-family:lucida grande;
font-size: 12px;
margin-top: 4px;
margin-left: 4px;
position:absolute;
}
.menubox2 {
height:160px;
width:150px;
margin-top:70px;
background: #FAFAFA;
position:absolute;
}
.menuboxfont2 {
color: #333333;
font-family:lucida grande;
font-size: 12px;
margin-top: 4px;
margin-left: 4px;
position:absolute;
}
感谢您的帮助!
詹姆斯
最佳答案
有关代码和演示,请参阅 fiddle :
fiddle :http://jsfiddle.net/kHtmf/1/
演示:http://jsfiddle.net/kHtmf/1/embedded/result/
Firefox 的 SS:
Chrome 的 SS:
Safari 的 SS:
关于html - 我的高度属性在 firefox 中显示的结果与所有其他浏览器(safari、chrome act)不同。为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9965120/