html - 我的高度属性在 firefox 中显示的结果与所有其他浏览器(safari、chrome act)不同。为什么?

标签 html css firefox cross-browser

我有一个简单的布局, 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:

enter image description here

Chrome 的 SS:

enter image description here

Safari 的 SS:

enter image description here

关于html - 我的高度属性在 firefox 中显示的结果与所有其他浏览器(safari、chrome act)不同。为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9965120/

相关文章:

html - 如何使输入光标透明或不闪烁?

html - 在 span 元素下划线

html - Pure CSS Sticky Horizo​​ntal Subnav - 下拉菜单不显示

html - 单击汉堡菜单后,试图显示我的菜单。汉堡菜单显示在一定宽度上

带有 Linux 操作系统的 Firefox 的 css 元素边距

firefox - 如何验证我的 Firefox 扩展的首选项?

html - 'input' 元素之前或之后的 CSS 内容生成

html - 使用基础制作一个盒子容器

html - 如何堆叠 HTML 表格和中间的文本?

javascript - 如何使用 JavaScript 以编程方式选择 <img> 元素?