爲什麼my website在Google Chrome瀏覽器中的顯示效果與Mozilla Firefox瀏覽器不同?網站在不同瀏覽器中呈現不同
例子:
- 菜單是在Chrome
這裏是我的代碼越往上/小:
的header.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,300italic' rel='stylesheet' type='text/css' />
</head>
<body>
<div id="wrapper">
<div id="nav">
<nav>
<ul class="menu-hover">
<li> <a href="index.php"> Home </a> </li>
<li>
<a href="downloads.php" id="dd"> Downloads </a>
<ul>
<li><a href="paddis-skypetools.php">Paddis SkypeTools</a></li>
<li><a href="greatzip.php">GreatZip</a></a></li>
<li><a href="pczip-cleaner.php">Pc Zip Cleaner</a></a></li>
</ul>
</li>
<li> <a href="forums.php"> Forums </a></li>
<li> <a href="youtube.php"> YouTube </a> </li>
<li>
<a href="contact.php"> Contact </a>
</li>
</ul>
</nav>
</div>
</div>
</body>
</html>
風格。 C SS
body {
font-family: 'Source Sans Pro';
}
#wrapper {
width:100%;
background-color:white;
margin:auto;
}
#top {
width:100%;
height:60px;
border-style: solid;
border-width: 1px;
}
#logo {
clear:left;
border-style: solid;
border-width: 1px;
width:30%;
float:left;
height:60px;
}
#nav {
clear:right;
width: 100%;
border-width: 0px;
float:right;
height:60px;
}
#content
{
width:97.9%;
min-height:400px;
border-style: solid;
border-width: 1px;
padding:20px;
}
#footer {
height:100px;
}
.divider1 {
display: block;
float: left;
padding: 0;
margin: 8px auto;
height: 0;
width: 90%;
max-height: 0;
font-size: 1px;
line-height: 0;
clear: both;
border: none;
border-top: 1px solid #aaaaaa;
border-bottom: 1px solid #ffffff;
}
.bp {
width: 60%;
}
/* Navigation Menu
---------------------------------*/
ul ul {
display: none;
background: #00B6ED;
}
ul li:hover > ul {
display: block;
}
ul {
background: #00B6ED;
border-radius: 2px;
list-style: none;
position: relative;
margin-top: -25px;
margin-left: -8px;
}
ul:after {
content: "";
clear: both;
display: block;
}
ul li {
float: left;
}
ul li:hover {
background: #404040;
}
ul li:hover a {
color: #fff;
}
ul li a {
display: block;
padding: 8px 5px;
color: #FFF;
text-decoration: none;
height: 25px;
font-size: 20px;
margin: 10px;
margin-top: 5px;
}
ul ul { /* Hover menu */
background: #6B6B6B;
border-radius: 0px;
padding: 0;
position: absolute;
top: 100%;
margin-top: 0px;
margin-left: 0px;
}
ul ul li {
float: none;
border-top: 1px solid #6B6B6B;
position: relative;
}
ul ul li a {
color: #fff;
height: 30px;
margin-bottom: 0px;
}
ul ul li a:hover {
background: #404040;
height: 30px;
margin-bottom: 0px;
}
ul ul ul {
position: absolute;
left: 100%;
height: 35px;
top: 0;
}
.js-enabled ul li:hover > ul {
display: none;
}
.menu-hover {
margin-left: -8px;
width: 100%;
margin-top: -36px;
}
看起來和我完全一樣。 – APAD1 2014-09-02 15:10:35
哦,我明白了,它現在不加載css?! – 2014-09-02 15:16:54
http://stackoverflow.com/questions/25760396/chrome-automatic-shift-of-web-elements – 2014-09-18 17:20:48