2017-04-23 84 views
0

我的菜单出现了问题,我找不到原因。当我在响应式视图中测试我的代码时,它首先在从汉堡包图标切换到水平导航栏时正常工作,但是...如果我单击汉堡包图标第一个(一旦下拉菜单并第二次关闭它)和然后调整屏幕大小,我的水平导航菜单消失。导航栏中的错误?

下面是在Codepen中链接的代码。只需进入完整视图并尝试这些步骤,看看您的想法!谢谢!!

http://codepen.io/sshine2/pen/VbjGaE

<!DOCTYPE html> 

<html lang="en"> 

<head> 
<meta charset="utf-8"> 
<script src="http://www.google.com/jsapi" type="text/javascript"></script> 
<script type="text/javascript">google.load("jquery", "1.3.2");</script> 
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> 

<style> 
body { 
font-family: 'Noto Sans', sans-serif; 
margin: 0; 
width: 100%; 
height: 100vh; 
background: #ffffff; 
background-color: black; 
-webkit-font-smoothing: antialiased; 
-moz-osx-font-smoothing: grayscale; 
    } 

header { 
width: 100%; 
background: #ffffff; 
position: fixed; 
height: 4em; 
line-height: 4em; 
display: inline-block; 
padding-left: 1em; 
border-bottom: .1em solid #dddddd; 
    } 
h2 { 
font-size: 2.1em; 
    } 
p { 
font-size: 10em; 
color: white; 
padding-top: 1em; 
    } 

@media only screen and (min-width: 319px) { 

.menu { 
    z-index: 1; 
    display: none; 
    font-weight: bold; 
    font-size: 1.2em; 
    width: 100%; 
    background: #f1f1f1; 
    position: fixed; 
    text-align: center; 
    margin-top: 3.3em; 
    color: black; 
    } 

    .menu ul { 
    margin: 0; 
    padding: 0; 
    list-style-type: none; 
    list-style-image: none; 
    border-top: #dddddd 1px solid; 
    } 

    .menu li { 
    display: block; 
    padding: 1em 0 1em 0; 
    border-bottom: #dddddd 1px solid; 
    } 

    .menu li:hover { 
    display: block; 
    background: #585858; 
    padding: 1em 0 1em 0; 
     cursor: crosshair; 
    } 

    .menu ul li a { 
    text-decoration: none; 
    margin: 0px; 
    color: black; 
    } 

    .menu ul li a:hover { 
    color: white; 
    text-decoration: none; 
    } 

    .menu a { 
    text-decoration: none; 
    color: black; 
    } 

    .menu a:hover { 
    text-decoration: none; 
    color: white; 
    } 

    #nav-icon4 { 
    width: 35px; 
    height: 25px; 
    float: right; 
    margin-top: -47px; 
    margin-right: 30px; 
    -webkit-transform: rotate(0deg); 
    -moz-transform: rotate(0deg); 
    -o-transform: rotate(0deg); 
    transform: rotate(0deg); 
    -webkit-transition: .5s ease-in-out; 
    -moz-transition: .5s ease-in-out; 
    -o-transition: .5s ease-in-out; 
    transition: .5s ease-in-out; 
    cursor: cell; 
    } 

    #nav-icon4 span { 
    display: block; 
    position: absolute; 
    height: 5px; 
    width: 100%; 
    background: darkred; 
    border-radius: 7px; 
    opacity: 2; 
    left: 0; 
    -webkit-transform: rotate(0deg); 
    -moz-transform: rotate(0deg); 
    -o-transform: rotate(0deg); 
    transform: rotate(0deg); 
    -webkit-transition: .25s ease-in-out; 
    -moz-transition: .25s ease-in-out; 
    -o-transition: .25s ease-in-out; 
    transition: .25s ease-in-out; 
    } 

    #nav-icon4 span:nth-child(1) { 
    top: 0px; 
    -webkit-transform-origin: left center; 
    -moz-transform-origin: left center; 
    -o-transform-origin: left center; 
    transform-origin: left center; 
    } 

    #nav-icon4 span:nth-child(2) { 
    top: 10px; 
    -webkit-transform-origin: left center; 
    -moz-transform-origin: left center; 
    -o-transform-origin: left center; 
    transform-origin: left center; 
    } 

    #nav-icon4 span:nth-child(3) { 
    top: 20px; 
    -webkit-transform-origin: left center; 
    -moz-transform-origin: left center; 
    -o-transform-origin: left center; 
    transform-origin: left center; 
    } 

    #nav-icon4.open span:nth-child(1) { 
    -webkit-transform: rotate(45deg); 
    -moz-transform: rotate(45deg); 
    -o-transform: rotate(45deg); 
    transform: rotate(45deg); 
    top: 0; 
    left: 6px; 
    } 

    #nav-icon4.open span:nth-child(2) { 
    width: 0%; 
    opacity: 0; 
    } 

    #nav-icon4.open span:nth-child(3) { 
    -webkit-transform: rotate(-45deg); 
    -moz-transform: rotate(-45deg); 
    -o-transform: rotate(-45deg); 
    transform: rotate(-45deg); 
    top: 25px; 
    left: 6px; 
    } 
    } 


@media only screen and (min-width : 768px) { 
    h2 { 
     z-index: 1000000; 
     font-size: 1.5em; 
     } 

     p { 
      font-size: 20em; 
      color: white; 
      padding-top: 1em; 
    } 

     ul { 
      list-style-type: none; 
      margin: 0; 
      padding: 0; 
      overflow: hidden; 
    } 

    li { 
    float: right; 
    margin-left: 20px; 
    margin-right: 8px; 
    margin-top: -10px; 
} 

li a { 
    display: block; 
    text-align: center; 
    text-decoration: none; 
} 


.menu { 
    display: block; 
    position: absolute; 
    right: 0px; 
    font-size: .9em; 
    width: 100%; 
    padding-right: 15px; 
    margin-top: 10px; 
    padding-top: 10px; 
    padding-bottom: 10px; 
    background: rgba(255, 255, 255, 0); 
    } 
.menu ul { 
    border-bottom: 0; 
    border-top: 0; 
    } 
.menu li { 
    border-bottom: 0; 
    border-top: 0; 
    } 
.menu li:hover { 
    cursor: crosshair; 
    padding-top: 1em; 
    padding-bottom: .4em; 
    padding-right: 0em; 
    padding-left: 0em; 
    } 

.menu ul li a:hover { 
    color: white; 
} 

#nav-icon4 { 
    display: none; 
    } 
} 

@media only screen and (min-width : 922px) { 
    li { 
    margin-left: 55px; 
    margin-right: 18px; 

    } 
.menu { 
    padding-right: 1px; 
    } 
} 


@media only screen and (min-width : 1400px) { 
    header { 
     height: 5em; 
     line-height: 5em; 
    } 
    h2 { 
     font-size: 2.6em;  
    } 
    li { 
    margin-left: 55px; 
    margin-right: 30px; 
    } 
    .menu { 
     padding-right: 1px; 
     font-size: 1.2em; 
    } 
} 

    </style> 

<title>hamburgers</title> 
</head> 

<body> 
    <header> 

     <span>Shine Design</span> 
     <div id="nav-icon4"> 
     <span></span> 
     <span></span> 
     <span></span> 
     </div> 

    </header> 

    <div class="menu"> 
     <ul> 
     <a href="#"> 
     <li>LINK ONE</li> 
     </a> 
     <a href="#"> 
     <li>LINK TWO</li> 
     </a> 
     <a href="#"> 
     <li>LINK THREE</li> 
     </a> 
     <a href="#"> 
     <li>LINK FOUR</li> 
     </a> 
     <a href="#"> 
     <li>LINK FIVE</li> 
     </a> 
     </ul> 
    </div> 

    </body> 
    <script> 
    $(document).ready(function(){ 
     $('#nav-icon4').click(function(){ 
     $(this).toggleClass('open'); 
     }); 
    }); 
    </script> 
    </html> 
+0

为什么你使用的是旧版本的jQuery? –

+0

我不知道!我不知道我使用的是旧版本。我究竟做错了什么? – SShine2

+0

我不知道我只是评论它,因为它是旧的,如CDN URL中的版本字符串所示。如果这是一个新项目,考虑到已经有一个V3,你不应该使用jQuery 1。 –

回答

1

slideToggle()切换显示属性的功能,它把它添加到这使得它更优先比使用类

所以菜单的元素风格解决这个问题添加重要display:block;在媒体屏幕min-width : 768px;

@media only screen and (min-width : 768px) { 
    ..... 
    .menu { 
    display: block!important; 
    ..... 
    } 
} 

See updated codepen

+1

这是最简单和最好解释的答案,它完美的作品。非常感谢。 – SShine2

+1

欢迎您:) – Chiller

0

使用jQuery,并在年底或标记之前

<script src="http://www.google.com/jsapi" type="text/javascript"></script> 
<script type="text/javascript">google.load("jquery", "1.3.2");</script> 
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> 

用JS这个

<!DOCTYPE html> 

<html lang="en"> 

<head> 
<meta charset="utf-8"> 
<style> 
body { 
font-family: 'Noto Sans', sans-serif; 
margin: 0; 
width: 100%; 
height: 100vh; 
background: #ffffff; 
background-color: black; 
-webkit-font-smoothing: antialiased; 
-moz-osx-font-smoothing: grayscale; 
    } 

header { 
width: 100%; 
background: #ffffff; 
position: fixed; 
height: 4em; 
line-height: 4em; 
display: inline-block; 
padding-left: 1em; 
border-bottom: .1em solid #dddddd; 
    } 
h2 { 
font-size: 2.1em; 
    } 
p { 
font-size: 10em; 
color: white; 
padding-top: 1em; 
    } 

@media only screen and (min-width: 319px) { 

.menu { 
    z-index: 1; 
    display: none; 
    font-weight: bold; 
    font-size: 1.2em; 
    width: 100%; 
    background: #f1f1f1; 
    position: fixed; 
    text-align: center; 
    margin-top: 3.3em; 
    color: black; 
    } 

    .menu ul { 
    margin: 0; 
    padding: 0; 
    list-style-type: none; 
    list-style-image: none; 
    border-top: #dddddd 1px solid; 
    } 

    .menu li { 
    display: block; 
    padding: 1em 0 1em 0; 
    border-bottom: #dddddd 1px solid; 
    } 

    .menu li:hover { 
    display: block; 
    background: #585858; 
    padding: 1em 0 1em 0; 
     cursor: crosshair; 
    } 

    .menu ul li a { 
    text-decoration: none; 
    margin: 0px; 
    color: black; 
    } 

    .menu ul li a:hover { 
    color: white; 
    text-decoration: none; 
    } 

    .menu a { 
    text-decoration: none; 
    color: black; 
    } 

    .menu a:hover { 
    text-decoration: none; 
    color: white; 
    } 

    #nav-icon4 { 
    width: 35px; 
    height: 25px; 
    float: right; 
    margin-top: -47px; 
    margin-right: 30px; 
    -webkit-transform: rotate(0deg); 
    -moz-transform: rotate(0deg); 
    -o-transform: rotate(0deg); 
    transform: rotate(0deg); 
    -webkit-transition: .5s ease-in-out; 
    -moz-transition: .5s ease-in-out; 
    -o-transition: .5s ease-in-out; 
    transition: .5s ease-in-out; 
    cursor: cell; 
    } 

    #nav-icon4 span { 
    display: block; 
    position: absolute; 
    height: 5px; 
    width: 100%; 
    background: darkred; 
    border-radius: 7px; 
    opacity: 2; 
    left: 0; 
    -webkit-transform: rotate(0deg); 
    -moz-transform: rotate(0deg); 
    -o-transform: rotate(0deg); 
    transform: rotate(0deg); 
    -webkit-transition: .25s ease-in-out; 
    -moz-transition: .25s ease-in-out; 
    -o-transition: .25s ease-in-out; 
    transition: .25s ease-in-out; 
    } 

    #nav-icon4 span:nth-child(1) { 
    top: 0px; 
    -webkit-transform-origin: left center; 
    -moz-transform-origin: left center; 
    -o-transform-origin: left center; 
    transform-origin: left center; 
    } 

    #nav-icon4 span:nth-child(2) { 
    top: 10px; 
    -webkit-transform-origin: left center; 
    -moz-transform-origin: left center; 
    -o-transform-origin: left center; 
    transform-origin: left center; 
    } 

    #nav-icon4 span:nth-child(3) { 
    top: 20px; 
    -webkit-transform-origin: left center; 
    -moz-transform-origin: left center; 
    -o-transform-origin: left center; 
    transform-origin: left center; 
    } 

    #nav-icon4.open span:nth-child(1) { 
    -webkit-transform: rotate(45deg); 
    -moz-transform: rotate(45deg); 
    -o-transform: rotate(45deg); 
    transform: rotate(45deg); 
    top: 0; 
    left: 6px; 
    } 

    #nav-icon4.open span:nth-child(2) { 
    width: 0%; 
    opacity: 0; 
    } 

    #nav-icon4.open span:nth-child(3) { 
    -webkit-transform: rotate(-45deg); 
    -moz-transform: rotate(-45deg); 
    -o-transform: rotate(-45deg); 
    transform: rotate(-45deg); 
    top: 25px; 
    left: 6px; 
    } 
    } 


@media only screen and (min-width : 768px) { 
    h2 { 
     z-index: 1000000; 
     font-size: 1.5em; 
     } 

     p { 
      font-size: 20em; 
      color: white; 
      padding-top: 1em; 
    } 

     ul { 
      list-style-type: none; 
      margin: 0; 
      padding: 0; 
      overflow: hidden; 
    } 

    li { 
    float: right; 
    margin-left: 20px; 
    margin-right: 8px; 
    margin-top: -10px; 
} 

li a { 
    display: block; 
    text-align: center; 
    text-decoration: none; 
} 


.menu { 
    display: block; 
    position: absolute; 
    right: 0px; 
    font-size: .9em; 
    width: 100%; 
    padding-right: 15px; 
    margin-top: 10px; 
    padding-top: 10px; 
    padding-bottom: 10px; 
    background: rgba(255, 255, 255, 0); 
    } 
.menu ul { 
    border-bottom: 0; 
    border-top: 0; 
    } 
.menu li { 
    border-bottom: 0; 
    border-top: 0; 
    } 
.menu li:hover { 
    cursor: crosshair; 
    padding-top: 1em; 
    padding-bottom: .4em; 
    padding-right: 0em; 
    padding-left: 0em; 
    } 

.menu ul li a:hover { 
    color: white; 
} 

#nav-icon4 { 
    display: none; 
    } 
} 

@media only screen and (min-width : 922px) { 
    li { 
    margin-left: 55px; 
    margin-right: 18px; 

    } 
.menu { 
    padding-right: 1px; 
    } 
} 


@media only screen and (min-width : 1400px) { 
    header { 
     height: 5em; 
     line-height: 5em; 
    } 
    h2 { 
     font-size: 2.6em;  
    } 
    li { 
    margin-left: 55px; 
    margin-right: 30px; 
    } 
    .menu { 
     padding-right: 1px; 
     font-size: 1.2em; 
    } 
} 

    </style> 

<title>hamburgers</title> 
</head> 

<body> 
    <header> 

     <span>Shine Design</span> 
     <div id="nav-icon4"> 
     <span></span> 
     <span></span> 
     <span></span> 
     </div> 

    </header> 

    <div class="menu"> 
     <ul> 
     <a href="#"> 
     <li>LINK ONE</li> 
     </a> 
     <a href="#"> 
     <li>LINK TWO</li> 
     </a> 
     <a href="#"> 
     <li>LINK THREE</li> 
     </a> 
     <a href="#"> 
     <li>LINK FOUR</li> 
     </a> 
     <a href="#"> 
     <li>LINK FIVE</li> 
     </a> 
     </ul> 
    </div> 
<script src="http://www.google.com/jsapi" type="text/javascript"></script> 
<script type="text/javascript">google.load("jquery", "1.3.2");</script> 
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> 
    </body> 
    <script> 
    $(document).ready(function(){ 
     $('#nav-icon4').click(function(){ 
     $(this).toggleClass('open'); 
     }); 
    }); 
    </script> 
    </html> 
1

放入一个。菜单display : block !important;,函数的slideToggle( )会在元素菜单中内嵌一个样式display:none带你回来的高分辨率,仍。菜单显示:无

0

我已经创建了一些需要完成的事情。添加了一些jQuery代码,使其按照你想要的方式工作。

步骤1 - 上窗口添加类hide-nav宽度

 /* logic For window width */ 
    if ($(window).width() > 768) { 
    // $('.menu').addClass('hide-nav'); 
    $('.menu').addClass('show-nav'); 
    } else { 
    $('.menu').removeClass('hide-nav'); 
    } 

第2步 -添加hide-nav类上窗口调整大小

 function resize() { 
    if ($(window).width() < 768) { 
     $('.menu').addClass('hide-nav'); 
     $('.menu').removeClass('show-nav'); 
    } 
    else { 

    $('.menu').addClass('show-nav'); 
} 
    } 

    $(window).resize(resize) 
    .trigger('resize'); 

$(document).ready(function() { 
 
    $('#nav-icon4').click(function() { 
 
    $(this).toggleClass('open'); 
 
    $(".menu").slideToggle("slow"); 
 
    }); 
 

 
    /* logic For window width */ 
 
    if ($(window).width() > 768) { 
 
    // $('.menu').addClass('hide-nav'); 
 
    $('.menu').addClass('show-nav'); 
 
    } else { 
 
    $('.menu').removeClass('hide-nav'); 
 
    } 
 
}); 
 

 
function resize() { 
 
    if ($(window).width() < 768) { 
 
    $('.menu').addClass('hide-nav'); 
 
    $('.menu').removeClass('show-nav'); 
 
    } else { 
 

 
    $('.menu').addClass('show-nav'); 
 
    } 
 
} 
 

 
$(window).resize(resize) 
 
    .trigger('resize');
body { 
 
    font-family: 'Noto Sans', sans-serif; 
 
    margin: 0; 
 
    width: 100%; 
 
    height: 100vh; 
 
    background: #ffffff; 
 
    background-color: black; 
 
    -webkit-font-smoothing: antialiased; 
 
    -moz-osx-font-smoothing: grayscale; 
 
} 
 

 
header { 
 
    width: 100%; 
 
    background: #ffffff; 
 
    position: fixed; 
 
    height: 4em; 
 
    line-height: 1.5em; 
 
    display: inline-block; 
 
    padding-left: 1em; 
 
    border-bottom: .1em solid #dddddd; 
 
} 
 

 
h2 { 
 
    font-size: 2.1em; 
 
} 
 

 
p { 
 
    font-size: 10em; 
 
    color: white; 
 
    padding-top: 1em; 
 
} 
 

 
@media only screen and (min-width: 319px) { 
 
    .menu { 
 
    z-index: 1; 
 
    display: none; 
 
    font-weight: bold; 
 
    font-size: 1.2em; 
 
    width: 100%; 
 
    background: #f1f1f1; 
 
    position: fixed; 
 
    text-align: center; 
 
    margin-top: 3.3em; 
 
    color: black; 
 
    } 
 
    .menu ul { 
 
    margin: 0; 
 
    padding: 0; 
 
    list-style-type: none; 
 
    list-style-image: none; 
 
    border-top: #dddddd 1px solid; 
 
    } 
 
    .menu li { 
 
    display: block; 
 
    padding: 1em 0 1em 0; 
 
    border-bottom: #dddddd 1px solid; 
 
    } 
 
    .menu li:hover { 
 
    display: block; 
 
    background: #585858; 
 
    padding: 1em 0 1em 0; 
 
    cursor: crosshair; 
 
    } 
 
    .menu ul li a { 
 
    text-decoration: none; 
 
    margin: 0px; 
 
    color: black; 
 
    } 
 
    .menu ul li a:hover { 
 
    color: white; 
 
    text-decoration: none; 
 
    } 
 
    .menu a { 
 
    text-decoration: none; 
 
    color: black; 
 
    } 
 
    .menu a:hover { 
 
    text-decoration: none; 
 
    color: white; 
 
    } 
 
    #nav-icon4 { 
 
    width: 35px; 
 
    height: 25px; 
 
    float: right; 
 
    margin-top: -60px; 
 
    margin-right: 30px; 
 
    -webkit-transform: rotate(0deg); 
 
    -moz-transform: rotate(0deg); 
 
    -o-transform: rotate(0deg); 
 
    transform: rotate(0deg); 
 
    -webkit-transition: .5s ease-in-out; 
 
    -moz-transition: .5s ease-in-out; 
 
    -o-transition: .5s ease-in-out; 
 
    transition: .5s ease-in-out; 
 
    cursor: cell; 
 
    } 
 
    #nav-icon4 span { 
 
    display: block; 
 
    position: absolute; 
 
    height: 5px; 
 
    width: 100%; 
 
    background: darkred; 
 
    border-radius: 7px; 
 
    opacity: 2; 
 
    left: 0; 
 
    -webkit-transform: rotate(0deg); 
 
    -moz-transform: rotate(0deg); 
 
    -o-transform: rotate(0deg); 
 
    transform: rotate(0deg); 
 
    -webkit-transition: .25s ease-in-out; 
 
    -moz-transition: .25s ease-in-out; 
 
    -o-transition: .25s ease-in-out; 
 
    transition: .25s ease-in-out; 
 
    } 
 
    #nav-icon4 span:nth-child(1) { 
 
    top: 0px; 
 
    -webkit-transform-origin: left center; 
 
    -moz-transform-origin: left center; 
 
    -o-transform-origin: left center; 
 
    transform-origin: left center; 
 
    } 
 
    #nav-icon4 span:nth-child(2) { 
 
    top: 10px; 
 
    -webkit-transform-origin: left center; 
 
    -moz-transform-origin: left center; 
 
    -o-transform-origin: left center; 
 
    transform-origin: left center; 
 
    } 
 
    #nav-icon4 span:nth-child(3) { 
 
    top: 20px; 
 
    -webkit-transform-origin: left center; 
 
    -moz-transform-origin: left center; 
 
    -o-transform-origin: left center; 
 
    transform-origin: left center; 
 
    } 
 
    #nav-icon4.open span:nth-child(1) { 
 
    -webkit-transform: rotate(45deg); 
 
    -moz-transform: rotate(45deg); 
 
    -o-transform: rotate(45deg); 
 
    transform: rotate(45deg); 
 
    top: 0; 
 
    left: 6px; 
 
    } 
 
    #nav-icon4.open span:nth-child(2) { 
 
    width: 0%; 
 
    opacity: 0; 
 
    } 
 
    #nav-icon4.open span:nth-child(3) { 
 
    -webkit-transform: rotate(-45deg); 
 
    -moz-transform: rotate(-45deg); 
 
    -o-transform: rotate(-45deg); 
 
    transform: rotate(-45deg); 
 
    top: 25px; 
 
    left: 6px; 
 
    } 
 
} 
 

 

 
/* Break at Devices such as Tablets, Desktops */ 
 

 
@media only screen and (min-width: 768px) { 
 
    h2 { 
 
    z-index: 1000000; 
 
    font-size: 1.5em; 
 
    } 
 
    p { 
 
    font-size: 20em; 
 
    color: white; 
 
    padding-top: 1em; 
 
    } 
 
    ul { 
 
    list-style-type: none; 
 
    margin: 0; 
 
    padding: 0; 
 
    overflow: hidden; 
 
    } 
 
    li { 
 
    float: right; 
 
    margin-left: 20px; 
 
    margin-right: 8px; 
 
    margin-top: -10px; 
 
    } 
 
    li a { 
 
    display: block; 
 
    text-align: center; 
 
    text-decoration: none; 
 
    } 
 
    .menu { 
 
    display: block; 
 
    position: absolute; 
 
    right: 0px; 
 
    font-size: .9em; 
 
    width: 100%; 
 
    padding-right: 15px; 
 
    margin-top: 10px; 
 
    padding-top: 10px; 
 
    padding-bottom: 10px; 
 
    background: rgba(255, 255, 255, 0); 
 
    } 
 
    .menu ul { 
 
    border-bottom: 0; 
 
    border-top: 0; 
 
    } 
 
    .menu li { 
 
    border-bottom: 0; 
 
    border-top: 0; 
 
    } 
 
    .menu li:hover { 
 
    cursor: crosshair; 
 
    padding-top: 1em; 
 
    padding-bottom: .4em; 
 
    padding-right: 0em; 
 
    padding-left: 0em; 
 
    } 
 
    .menu ul li a:hover { 
 
    color: white; 
 
    } 
 
    #nav-icon4 { 
 
    display: none; 
 
    } 
 
} 
 

 

 
/* Medium Devices, Desktops */ 
 

 
@media only screen and (min-width: 922px) { 
 
    li { 
 
    margin-left: 55px; 
 
    margin-right: 18px; 
 
    } 
 
    .menu { 
 
    padding-right: 1px; 
 
    } 
 
} 
 

 

 
/* Large Devices, Wide Screens */ 
 

 
@media only screen and (min-width: 1400px) { 
 
    header { 
 
    height: 5em; 
 
    line-height: 5em; 
 
    } 
 
    h2 { 
 
    font-size: 2.6em; 
 
    } 
 
    li { 
 
    margin-left: 55px; 
 
    margin-right: 30px; 
 
    } 
 
    .menu { 
 
    padding-right: 1px; 
 
    font-size: 1.2em; 
 
    } 
 
} 
 

 
.show-nav { 
 
    display: block !important; 
 
} 
 

 
.hide-nav { 
 
    display: none 
 
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> 
 

 
<head> 
 
    <meta charset="utf-8"> 
 

 
    <link rel="stylesheet" href="reset.css"> 
 

 
    <link rel="stylesheet" href="hamburgers.css"> 
 

 
    <script src="http://www.google.com/jsapi" type="text/javascript"></script> 
 

 
    <script type="text/javascript"> 
 
    google.load("jquery", "1.3.2"); 
 
    </script> 
 

 
    <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> 
 

 
    <script type="text/javascript" src="ham.js"></script> 
 

 
    <title>hamburgers</title> 
 

 
</head> 
 

 
<body> 
 

 

 
    <header> 
 
    <h2><span>Shine Design</span></h2> 
 
    <div id="nav-icon4"> 
 
     <span></span> 
 
     <span></span> 
 
     <span></span> 
 
    </div> 
 
    </header> 
 

 
    <div class="menu" id="menuExpand"> 
 
    <ul> 
 
     <a href="#"> 
 
     <li>LINK ONE</li> 
 
     </a> 
 
     <a href="#"> 
 
     <li>LINK TWO</li> 
 
     </a> 
 
     <a href="#"> 
 
     <li>LINK THREE</li> 
 
     </a> 
 
     <a href="#"> 
 
     <li>LINK FOUR</li> 
 
     </a> 
 
     <a href="#"> 
 
     <li>LINK FIVE</li> 
 
     </a> 
 
    </ul> 
 
    </div> 
 

 
    <main> 
 
    </main> 
 
</body> 
 

 
</html>