网站在Safari中工作,但不适用于Firefox或Chrome

时间:2014-11-18 22:19:54

标签: jquery html html5 google-chrome safari

我有一个网站,直到我试图用chrome然后firefox打开它之前它一直在游泳。没什么..

如果有人能帮助我解决为什么只能在Safari上工作,我真的很感激。

谢谢。

下面是我的代码 -

    <!doctype html>
<html>
<head>
<style type="text/css">
a:hover {
cursor:default;
}
</style>
<style type="text/css">
a { text-decoration:none }
</style>
<meta charset="UTF-8">
<style type="text/css">
body {
margin: 0;
font-size: 20px;
font-family: Avenir;
font-style: normal;
font-size:26px;
font-weight: 500;
}


section {
display: block;
height: auto;
width: auto;
min-width: auto;
min-height: 700px;
padding: 151px;
}
#RIP{
background: #000000;
color: #FFFFFF;
font-family: Avenir;
color: #ffffff;
font-size: 26px;
font-weight: 500;
transform: scale(7.193,7.193);
}
#Concept{
background:#FFFFFF;
color:#000000;
}
#Clients{
background:#000000;
color:#FFFFFF;
}
#Contact{
background:#FFFFFF;
color:#000000;
}
nav {
font-style: normal;
font-size:12px
color: #FFFFFF;
background color:#FFFFFF
text-decoration: none;
position: fixed;
text-align: center;
list-style-position: centre;
padding: 18px;
text-align:center
}
.nav {
position: fixed;
color: #FFFFFF;
background-color: #000000;
list-style-position: centre;
nav-index: centre;
text-decoration: none;
text-align: centre;
}
</style>

<script src="javascripts/jquery-1.11.1.min.js"></script>

<script src="javascripts/smoothscroll.js"></script>

<style type="text/css"> 
a:link { 
COLOR: #FFFFFF; 
} 
a:visited { 
COLOR: #FFFFFF; 
} 
a:hover { 
COLOR: #000000; 
} 
a:active { 
COLOR: #000000; 
} 
</style>
<script type="text/javascript">
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
</script>
<style type="text/css">
body {
margin: 0;
font-size: 20px;
font-family: Avenir;
font-style: normal;
font-size:26px;
font-weight: 500;
}


section {
display: block;
height: auto;
width: auto;
min-width: auto;
min-height: 700px;
padding: 151px;
}
#RIP{
background: #000000;
color: #FFFFFF;
font-family: Avenir;
color: #ffffff;
font-size: 26px;
font-weight: 500;
transform: scale(7.193,7.193);
}
#Concept{
background:#FFFFFF;
color:#000000;
}
#Clients{
background:#000000;
color:#FFFFFF;
}
#Contact{
background:#FFFFFF;
color:#000000;
}
nav {
font-style: normal;
font-size:12px
color: #FFFFFF;
background color:#FFFFFF
text-decoration: none;
position: fixed;
text-align: center;
list-style-position: centre;
padding: 18px;
text-align:center
}
.nav {
position: fixed;
color: #FFFFFF;
background-color: #000000;
list-style-position: centre;
nav-index: centre;
text-decoration: none;
text-align: centre;
}
</style>

<script src="javascripts/jquery-1.11.1.min.js"></script>

<script src="javascripts/smoothscroll.js"></script>

<style type="text/css"> 
a:link { 
COLOR: #FFFFFF; 
} 
a:visited { 
COLOR: #FFFFFF; 
} 
a:hover { 
COLOR: #000000; 
} 
a:active { 
COLOR: #000000; 
} 
</style>
<script type="text/javascript">

</script>
</head>
<nav></nav>
<nav class="nav"><a href="#RIP">RIP</a> <a href="#Scope">Scope</a> <a href="#Clients">Clients</a> <a href="#Contact">Contact</a></nav>

<section id="RIP"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('logo','','/images/blank.png',1)"><img src="/images/RIP.png" alt="" width="492" height="106" id="logo"></a><br>
<p> RestInProjects is a strategic consultancy and collaborative studio based<br>
in London and Berlin.</p>
<p>
We focus on but are not limited to; advising, public relations, web, media<br> 
and design in the fashion industy.
</section>
<section id="Scope">Scope<p>
Social Media Management, Strategic consultancy, Sourcing, Production,<br>
Content creation, E-commerce, Networking, Web Design, App Design,<br> 
Casting, Design, Press, PR
</section>
<section id="Clients">Clients<p>
Adidas, American Express, Barbour, Bread & Butter Asia, Capsule,<br> 
Coffin on Cake, Drapers, Fred Perry, GQ, Harvey Nichols, i-D<br> 
Jacket Required, Lacoste, Malmo London, Mini, Mo Studior, Niice<br> 
London, SEEK, U-homme, Umbro, Van Liebling, WeShallRun<br> 
</section>
<section id="Contact">Contact<p>
Portfolio On Request<br>
info@restinprojects.com
</section>
<p>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<span style="text-align: right">RIP.</span>
</body>

</html>

3 个答案:

答案 0 :(得分:0)

你的CSS代码中有许多拼写错误的单词,你写的是“中心”而不是“中心”。

此外,您在第55行和第57行中缺少分号。

我建议您在Aptana Studio或Netbeans等IDE中打开代码,它会自动为您标记错误。

编辑:刚刚注意到你也错过了开始的正文标记。

答案 1 :(得分:0)

您错过了<BODY>代码。

通过W3C语法验证程序运行您的网站以查找更多问题。 http://validator.w3.org/

答案 2 :(得分:0)

看看 Ameer Elsherif 的答案,指出你的一些问题。另一个问题是:

在两个<style> - 代码中,您为#RIP设置了样式。

删除行transform: scale(7.193,7.193);,然后在所有浏览器中页面看起来都相同。

使用比例尺(7.193,7.193),你会炸掉页面的大小。只有Safari不了解变换并以正常大小显示它。