1

在某一时刻它正在工作,但经过多次更改后,我没有意识到它停止了。该网站在 Chrome 中运行良好,在 IE 中几乎全部运行。Firefox 根本不显示横幅,并且使用 CSS 也不起作用。

我不确定它是我的 div 还是 Firefox 特定的东西。有人愿意帮忙吗?

如果 CSS 读起来很草率,我很抱歉。

    <!-- Primary Page Layout
================================================== -->
<script async="" src="/scripts/ga.js"></script><script src="scripts/modernizr-1.7.min.js"></script>

<!-- Delete everything in this .container and get started on your own site! -->
<div id="sizefix" class="wrapper">

<header id="mast" class="short">
<h1><a href="#"></a></h1>

<nav id="nav-logo" class="sample">   
<img src="stylesheets\images\logo.png"></img><img src="stylesheets\images\name.png"></img>
</nav>
<nav id="primary-nav">
<ul class="nav-tabs">
<li>
<a href="#aboutme" class="about">About me</a>
</li>
<li>
<a href="#resume" class="resume">Resume</a>
</li>
<li>
<a href="#portfolio" class="portfolio">Portfolio</a>
</li>
<li>
<a href="#contact" class="contact">Contact</a>
</li>
</ul>
</nav>
</header>
</div>

这是CSS

    header#mast{margin:0 0 0 -2000px;width:100%;position:fixed;top:0px;left:50%;z-index:100;}
    header#mast.tall{height:100px;}
    header#mast.short{height:100px;}


    header#mast h1{margin:0 62px 0 10px;width:600px;height:208px;}
    header#mast h1 a{width:168px;height:150px;display:block;text indent:-9999px;background:url(images/logo.png) no-repeat;}
    header#mast.short h1{margin:0px auto;width:200%;height:10px;}
    header#mast.short h1 a{width:250%;height:170px;background:url(images/header.png);}


    #nav-logo{margin:5px 0 0 1520px;height:24px;width: 100%;}
    #primary-nav{margin-top:30px;margin-right:-13px;height:20px;width:300%;float:left;background:url(images/) no-repeat; }
    #primary-nav ul{margin:25px 0 0 1680px;}
    #primary-nav li{margin:0 7px;}
    #primary-nav a{padding:10px;display:block;font:23px/1 "SteelfishRegular","HelveticaNeue","Helvetica Neue",Helvetica,Arial,sans-serif;text-transform:uppercase;text-decoration:none;}
    #primary-nav a.about{color:#05d205;text-shadow:rgba(0,0,0, 0.3) 0 1px 0;}
    #primary-nav a.portfolio{color:#df0a0a;text-shadow:rgba(0,0,0, 0.3) 0 1px 0;}
    #primary-nav a.resume{color:#1E8FF8;text-shadow:rgba(0, 0, 0, 0.3) 0 1px 0;}
    #primary-nav a.contact{color:#c105c1;text-shadow:rgba(0,0,0, 0.3) 0 1px 0;}
    #primary-nav a:hover{padding:10px;color:#063959;display:block;font:23px/1 "SteelfishRegular","HelveticaNeue","Helvetica Neue",Helvetica,Arial,sans-serif;text-transform:uppercase;text-decoration:none;}
    header#mast p.about{margin:36px 0 0 0;width:205px;height:90px;float:right;background:url(/images/bg_primary-nav.png) top right no-repeat;}
    header#mast p.about a{margin:24px 20px 0 12px;padding:10px;display:block;font:20px/1 "CoffeeService",Georgia,"Times New Roman",Times,serif;text-decoration:none;text-shadow:#ffffff 0 1px 0;}
4

1 回答 1

0

在此处检查您的 html 代码

<nav class="sample" id="nav-logo">   
    <img src="stylesheets\images\logo.png"><img src="stylesheets\images\name.png">
</nav>

src应该给出 likestylesheets/images/logo.png而不是stylesheets\images\logo.png导致提到的问题。

还要提一下,你的背景

header#mast h1 a{width:168px;height:150px;display:block;text indent:-9999px;background:url(images/logo.png) no-repeat;}

被以下的背景覆盖

header#mast.short h1 a{width:250%;height:170px;background:url(images/header.png);}

使用firebug检查您的页面。

于 2013-01-08T04:17:54.240 回答