智能手机默认浏览器中无响应菜单显示?

时间:2014-11-27 06:25:02

标签: javascript html css responsive-design

当我在智能手机中打开时,我的响应式网站默认浏览器响应式菜单未显示,但当我查看智能手机Chrome浏览器时,其工作正常。能不能帮我解决这个问题吗?

这是我的代码:

响应式CSS代码:

.navigation {
    display: none;
}

.mobi-menu {
    display: block;
    float: right;
    width: 40px;
    height: 40px;
    position: absolute;
    right: 30px;
    bottom: -6px;
    outline: none;
}

.mobi-menu span {
    position: absolute;
    width: 20px;
    height: 2px;
    left: 10px;
    -moz-transition: all 0.4s ease;
    -webkit-transition: all 0.4s ease;
    -ms-transition: all 0.4s ease;
    -o-transition: all 0.4s ease;
    transition: all 0.4s ease;
}

.mobi-menu span:nth-child(1) {
    top: 13px;
}

.mobi-menu span:nth-child(2) {
    top: 50%;
    margin-top: -1px;
}

.mobi-menu span:nth-child(3) {
    bottom: 13px;
}

.mobi-nav-container {
    display: block;
    -moz-transition: all 0.4s ease;
    -webkit-transition: all 0.4s ease;
    -ms-transition: all 0.4s ease;
    -o-transition: all 0.4s ease;
    transition: all 0.4s ease;
    padding: 20px 30px 50px 50px;
    width: 200px;
    position: absolute;
    right: 0px;
    top: 140px;
    visibility: hidden;
    opacity: 0;
    z-index: 999;
}

.mobi-menu.open ~ .mobi-nav-container {
    top: 100px;
    opacity: 1;
    visibility: visible;
}

.mobi-menu.open span:first-child {
    -moz-transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    transform: rotate(45deg);
    top: 19px;
}

.mobi-menu.open span:nth-child(2) {
    opacity: 0;
}

.mobi-menu.open span:last-child {
    -moz-transform: rotate(135deg);
    -webkit-transform: rotate(135deg);
    -ms-transform: rotate(135deg);
    -o-transform: rotate(135deg);
    transform: rotate(135deg);
    bottom: 19px;
}

.mobi-navigation {
}

.mobi-navigation > li {
    text-align: right;
    padding: 0;
    position: relative;
}

.mobi-navigation > li i {
    position: absolute;
    left: 0;
    top: 12px;
    font-size: 80%;
}

.mobi-navigation ul {
    display: none;
    margin: 0;
}

.mobi-navigation a {
    outline: none;
    display: block;
    padding: 5px 12px;
    width: 100%;
    font-size: 120%;
    border-bottom-width: 1px;
    border-bottom-style: dashed;
    background-color: #993399;
    z-index: 1;
}

.mobi-navigation > li > a {
}

以下是我的HTML代码:

<div class="mobi-nav-container" style="min-height: 1209px;">
   <ul id="menu-main-1" class="mobi-navigation">
   <li id="menu-item-8" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-8">
      <a href="index.html">HOME</a>
   </li>
   <li id="menu-item-20" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-ancestor current-menu-parent current_page_parent current_page_ancestor menu-item-has-children menu-item-20">
      <a href="">WHO WE ARE ? <i class="fa fa-angle-down"></i></a>
      <ul class="sub-menu" style="display: none;">
         <li id="menu-item-185" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-185"><a href="genesis.html">THE GENESIS </a></li>
      </ul>
   </li>
   <li id="menu-item-209" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-209">
      <a href="">WHAT WE OFFER ? <i class="fa fa-angle-down"></i></a>
   </li>
   <li id="menu-item-418" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-418">
      <a href="">WHAT WE DO ? <i class="fa fa-angle-down"></i></a>
      <ul class="sub-menu">
         <li id="menu-item-210" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-210"><a href="">CORPORATE IDENTITY  </a></li>
         </li>
         <li id="menu-item-419" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-418">
            <a href="">HOW WE DO ? <i class="fa fa-angle-down"></i></a>
            <ul class="sub-menu">
               <li id="menu-item-289" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-289"><a href="">THE APPROACH  </a></li>
            </ul>
         </li>
         <li id="menu-item-475" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-475"><a href="contact.html">WHERE TO LOCATE US?  </a></li>
      </ul>
      <!--end mobile navigation-->
      <div class="clear"></div>
</div>

提前致谢。

0 个答案:

没有答案