2013-02-21 49 views
0
.cssnav { 
         position:relative; 
         font-family: arial, helvetica, sans-serif; 
         background-image: url(img/twitter.jpg)no-  repeat center center; 
         background-repeat: no-repeat; 
         white-space: nowrap; 
         display: block; 
         width: 211px; 
         height: 44px; 
         margin: 0; 
         padding: 0; 
      } 
      .cssnav a { 
         display: block; 
         color: #000000; 
         font-size: 11px; 
         width: 211px; 
         height: 44px; 
         display: block; 
         float: left; 
         color: black; 
         text-decoration: none; 
      } 

      .cssnav img {width: 211px; height: 44px; border: 0; } 
      * html a:hover {visibility:visible} 
      .cssnav a:hover img{visibility:hidden} 

      .cssnav span { 
         position: absolute; 
         left: 30px; 
         top: 15px; 
         margin: 0px; 
         padding: 0px; 
         cursor: pointer; 
         width: 149px; 
         height: 14px; 
         text-align: center; 
      } 
      /* END OF NAVIGATION */ 


    } 



<html> 

    <head> 
     <title>The history of aeronautics</title> 

     <meta charset="utf-8" /> 
     <meta name="description" content="A parallax scrolling experiment using   jQuery" /> 

     <link rel="stylesheet" media="all" href="css/test.css" /> 

    </head> 

    <body> 




       <!--MAIN NAVIGATION START--> 

       <div class="cssnav"><a href="http://www.search-this.com/" title="Search Engine Submission"><img src="img/twitter.png" alt="Search Engine Submission" /><span>Search 
        Engine Submission</span></a></div> 
       <div class="cssnav"><a href="http://www.search-this.com/website-design/" title="Website Design"><img src="img/twitter.jpg" alt="Website Design" /><span>Website 
        Design</span></a></div> 




    </body> 

</html> 

我已經包括我的CSS和HTML。我一直在這一段時間試圖找出爲什麼它不工作...我使用trifecta翻轉按鈕代碼從這裏:http://www.webcredible.co.uk/user-friendly-resources/css/rollover-buttons.shtml圖像懸停不出現在CSS中,但它在頭部

它的作品,當我把代碼放在我的HTML區域,但不,當我把它放在CSS

+0

您的CSS或者需要在鏈接的外部樣式表中,或者在head元素中的