2014-05-24 47 views
0

嗨我使用twitter引導爲我的網站design.My頁眉和頁腳粘。它與筆記本電腦和大多數mobiles.But工作正常,但我面臨三星系列和舊IE的問題。以下是我的代碼。標題Bootstrap粘頭和頁腳

<!DOC TYPE HTML> 
<html> 
<head> 
    <!-- Bootstrap core CSS --> 
    <link href="css/bootstrap.min.css" rel="stylesheet"> 
    <!-- Custom styles for this template --> 
    <link href="css/navbar-fixed-top.css" rel="stylesheet"> 
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> 
    <!--[if lt IE 9]> 
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> 
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> 
    <![endif]--> 
    <link href="css/carousel.css" rel="stylesheet"> 
</head> 
<body> 
    <div class="navbar navbar-inverse navbar-fixed-top " role="navigation"> 
     <div class="container"> 
      <div class="navbar-header"> 
       <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> 
       <ul class="nav navbar-nav"> 
        <li> <a class="navbar-brand" href="#"><img src="images/Upper Logo.png" style="position:relative;top:-15px"></a> </li> 
       </ul> 
      </div> 
      <div class="navbar-collapse collapse"> 
       <?php $directory = (@$_SERVER["HTTPS"] == "on") ? "https://" : "http://"; if ($_SERVER["SERVER_PORT"] != "80") { $directory .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $directory .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } $test = explode('/',ltrim($directory)); // loop through each directory, check against the known directories, and add class $directories = array("index.php", "about_us.php","cs.php","products.php","services.php","contact_us.php"); // set home as 'index', but can be changed based of the home uri foreach ($directories as $folder){ $active[$folder] = ($test[4] == $folder)? "active":"noactive"; } ?> 
       <ul class="nav navbar-nav navbar-right "> 
        <li class="<?php echo $active['index.php']?>"><a href="index.php">Home</a></li> 
        <li class="<?php echo $active['about_us.php']?>"><a href="about_us.php">About Us</a></li> 
        <li class="<?php echo $active['cs.php']?>"><a href="cs.php">Consulting and Solutions</a></li> 
        <li class="<?php echo $active['products.php']?>"><a href="products.php">Products</a></li> 
        <li class="<?php echo $active['services.php']?>"><a href="services.php">Services</a></li> 
        <li class="<?php echo $active['contact_us.php']?>"><a href="contact_us.php">Contact Us</a></li> 
       </ul> 
      </div> 
     </div> 
    </div> 
    Footer 
    <div class="navbar navbar-inverse navbar-fixed-bottom " id="footer1" role="navigation"> 
     <div class="container"> 
      <div class="row"> 
       <div class="navbar-header" style="color:#999"> <span class="hidden-840" style="position:relative;top:5px"> Follow Us &nbsp;&nbsp;</span> <a href="http://in.linkedin.com/pub/7concepts-informatics-private-limited/2a/710/439" target="_blank"> <img style="padding-top:6px" src="images/linkedin.png" /> </a> <a href="https://www.facebook.com/pages/7Concepts-Informatics/131225693610585" target="_blank"> <img style="padding-top:6px" src="images/fb.png" /> </a> <a href="https://twitter.com/the7concepts" target="_blank"> <img style="padding-top:6px" src="images/twiiter.png" /> </a> <a href="https://plus.google.com/116053421390242697720/about?hl=en" target="_blank"> <img class="hidden-840" style="padding-top:6px" src="images/google+.png" /> </a> <a href="mailto:[email protected]" target="_blank"> <img style="padding-top:6px" src="images/mail.png" /> </a> </div> 
       <div class="navbar-collapse navbar-right hidden-840" style="color:#999"> 
        <ul class="nav navbar-nav"> 
         <li> <a> </a> </li> 
        </ul> 
       </div> 
      </div> 
     </div> 
    </div> 
    <script src="js/jquery.min.js"></script> 
    <script src="js/bootstrap.min.js"></script> 
</body> 
</html> 
+0

Bootstrap與IE版本<8不兼容,所以遇到問題並不奇怪。 – dlev

+1

嘿傢伙我找到了解決方案,我不知道它是如何工作的,但一行代碼使魔術,現在的工作。這是代碼:-webkit-backface-visibility:hidden; – ShyamD

回答

0

我相信這會回答你的問題,如果你是指「舊IE」7和更低。考慮到這是HTML5中的一個新功能,我並不感到意外,舊版瀏覽器不支持它。

注:我會張貼圖片,但我缺乏必要的聲譽點。