Navbar在没有Bootstrap的情况下折叠

时间:2016-01-22 17:08:20

标签: css html5 css3

您好我试图让我的导航栏在较小的屏幕尺寸上崩溃我试图在没有任何建议的情况下执行此操作吗?

HTML

<html>
<head>
    <title></title>
    <!-- CSS STYLESHEET -->
    <link rel="stylesheet" type="text/css" href="index.css">
    <link href="http://fonts.googleapis.com/css?family=Montserrat|Black+Ops+One|Luckiest+Guy|Montez|Courgette|Slackey|Fontdiner+Swanky|Permanent+Marker|Aclonica|Lobster" rel='stylesheet' type='text/css'>
    <!-- JavaScript's -->
    <script src="//code.jquery.com/jquery-1.10.2.js"></script>

</head>
<script type="text/javascript">
$(function() {

    // note that this doens't call hide   
    $('#loading').delay(3000).fadeOut('slow');
});
</script>
<body>
<div id="loading">
<div id="loading-center">
<div id="loading-center-absolute">
<div id="object"></div>
</div>
</div>
</div>
<!-- Loading Section Ends -->
<div class="header">
<nav class="nav_first">
            <img class="nike" src="http://s3.amazonaws.com/nikeinc/assets/7366/Nike_Swoosh_Logo_White_original.jpg?1328660973">

  <ul>
    <li class="wiggle" class="wiggle" class="wiggle" class="wiggle"><a href="#" class="active">Home</a></li>
    <li class="wiggle" class="wiggle" class="wiggle"><a href="about.php">About Us</a></li> 
    <li class="wiggle" class="wiggle"><a href="/shop">Shop</a></li> 
    <li class="wiggle"><a href="/contact">Contact</a></li>
  </ul>
  </nav>
</div>
<div class="wrapper">
    <div>
        <h1 id="nike_text">Nike</h1>
    </div>  
</div>
</body>
</html>

CSS

body {
    width: auto;
    height: auto;
    font-size:14px;
    margin:0;
    background-color:black;
}
#loading {
    display:none;
    background-color: #bd4932;
    height: 100%;
    width: 100%;
    position: fixed;
    z-index: 1;
    margin-top: 0px;
    top: 0px;
}
#loading-center{
    width: 100%;
    height: 100%;
    position: relative;
}
#loading-center-absolute {
    position: absolute;
    left: 50%;
    top: 50%;
    height: 200px;
    width: 200px;
    margin-top: -100px;
    margin-left: -100px;
}
#object{
    width: 80px;
    height: 80px;
    background-color: #FFF;
    -webkit-animation: animate 1s infinite ease-in-out;
    animation: animate 1s infinite ease-in-out;
    margin-right: auto;
    margin-left: auto;
    margin-top: 60px;
}
@-webkit-keyframes animate {
  0% { -webkit-transform: perspective(160px); }
  50% { -webkit-transform: perspective(160px) rotateY(-180deg); }
  100% { -webkit-transform: perspective(160px) rotateY(-180deg) rotateX(-180deg); }
}

@keyframes animate {
  0% { 
    transform: perspective(160px) rotateX(0deg) rotateY(0deg);
    -webkit-transform: perspective(160px) rotateX(0deg) rotateY(0deg); 
  } 50% { 
    transform: perspective(160px) rotateX(-180deg) rotateY(0deg);
    -webkit-transform: perspective(160px) rotateX(-180deg) rotateY(0deg) ;
  } 100% { 
    transform: perspective(160px) rotateX(-180deg) rotateY(-180deg);
    -webkit-transform: perspective(160px) rotateX(-180deg) rotateY(-180deg);
  }
}
/* SASU - Navigation Bar */
.nav_first{
    overflow:none;
    list-style-type:none;
    margin:0;
    padding:0;
    text-align:center;
}
.nav_first li{
    display:inline;
}
.nav_first a{
    margin-top:25px;
    font-size: 30px;
    letter-spacing: 3px;
    font-weight:900;
    margin-left:40px;
    margin-right:40px;
    font-family: 'Montserrat';
    text-decoration: none;
    display:inline-block;
    padding:10px;
}
.nav_first a:hover {
    color:white;
    font-size:35px;
}

@-webkit-keyframes wiggle {
    0% {
        -webkit-transform:rotate(4deg);
    }
    50% {
        -webkit-transform:rotate(-4deg);
    }
    100% {
        -webkit-transform:rotate(4deg);
    }
}

.wiggle:hover {
    -webkit-animation: wiggle 0.5s infinite;
}
.active {background-color:orangered;}
img{
    float:left;
    margin:0 auto;
    padding:0 auto;
}
/* Middle Section */
.nike {
    display: block;
    margin:auto;
    height:115px;
}
#nike_text {
    font-family:'Montez';
    font-size:80px;
    text-align: center;
    color:white;
    margin:auto;
    letter-spacing: 2px;
}

0 个答案:

没有答案