桌面或移动设备上的 Safari 中不显示菜单图标 [英] Menu icon doesn't show up in Safari on desktop or at all on mobile

查看:68
本文介绍了桌面或移动设备上的 Safari 中不显示菜单图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我为 735px 或更小的窗口大小创建的移动菜单.移动菜单图标(右上角)不会在桌面版 Safari 或任何移动浏览器(包括 Chrome 和 Safari)中显示.我有一种感觉,我可能会忽略一些明显的东西,但我就是想不通.

这可能与溢出:隐藏有关吗?我发现如果我在我的类 .mobilenav 中禁用它,菜单图标会显示,但显然,关闭图标也会显示.如果这是问题的根源,我该如何在保持菜单功能不变的情况下修复它?

它适用于桌面的浏览器:Chrome 75.0.3770.142、Firefox 68.0、Edge 42.17134.1.0 它不适用于桌面的浏览器:Safari 12.1.1 在移动设备上,它似乎不适用于任何浏览器.我检查了 Safari 和 Chrome.

//BEGIN MOBILE NAV函数 openMobile() {document.getElementById("myMobilenav").style.width = "100%";document.getElementById("myMobilenav").style.borderLeft = "none";}函数 closeMobile() {document.getElementById("myMobilenav").style.width = "0";document.getElementById("myMobilenav").style.borderLeft = "none";}//结束移动导航//移动下拉菜单//* 遍历所有下拉按钮以在隐藏和显示其下拉内容之间切换\*/var dropdown = document.getElementsByClassName("mobile-dropdown-btn");变量 i;for (i = 0; i < dropdown.length; i++) {dropdown[i].addEventListener("click", function() {this.classList.toggle("mobileactive");var dropdownContent = this.nextElementSibling;if (dropdownContent.style.display === "block") {dropdownContent.style.display = "无";} 别的 {dropdownContent.style.display = "block";}});}document.getElementById("myMobilenav").ontouchmove = function(e) {e.preventDefault();}

body {边距:0;}@media(最大宽度:735px){.nav {显示:无;}.navcontainer {显示:无;}header.Header.Header--top {显示:无;}}/* 结束主要导航风格 */.mobilehead {宽度:120px!重要;显示:块;左边距:10px;填充顶部:-10px;}#mobilehead {宽度:100%;高度:80px;背景颜色:#e9e5fb;边框底部:实心 1px #000;底边距:80px;}/* 开始移动导航风格 */.mobilenavcontainer {高度:100%;宽度:0px;背景颜色:#e9e5fb;位置:固定;顶部:0;右:0;z-索引:997;}#mobilemenuicon {宽度:80px;高度:自动;z-索引:5000;}.mobilenav .mobilemenuicon {顶部:20px;右:18px;位置:固定;z-index:50000;}#mobilecloseicon {宽度:80px;}.mobilenav .mobileclosebtn {顶部:20px;右:18px;左边距:10px;位置:绝对;}.mobilenav {高度:100%;宽度:0;位置:固定;z-索引:1000;顶部:0;右:0;背景颜色:#e9e5fb;溢出:隐藏;填充顶部:120px;字体系列:AmerigoBT";}.mobilemainitems a {文字装饰:无;字体大小:3em;颜色:#000;显示:块;-webkit-text-stroke: .75px #000;-webkit-text-fill-color: #e9e5fb;行高:50px;宽度:180px;}.mobilemainitems {padding-left: 30px;填充顶部:0px;边距顶部:-96px;}.mobilesocialitems a {文字装饰:无;字体大小:1.5em;颜色:#000;显示:内联块;字体粗细:400;}.mobilesocialitems {padding-left: 30px;行高:35px;顶部:480px;位置:绝对;}.row1social {padding-left: 50px;显示:块;宽度:250px!重要;}/* 下拉按钮 */.mobile-dropdown-btn {字体系列:AmerigoBT";文字装饰:无;字体大小:18px !重要;颜色:#000;显示:块;过渡:0.3s;行高:54px;边界:无;背景:无;宽度:200px;文本对齐:左;大纲:无;margin-left: -11px !important;填充底部:5px;}/* 活动下拉按钮的活动类 */.mobileactive 一个 {背景颜色:无;-webkit-text-stroke: .75px #000 !important;-webkit-text-fill-color: #e9e5fb !important;}/* 下拉容器 */.mobile-dropdown-container {显示:无;背景颜色:无;padding-left: 20px;字体系列:UniversEx";字体大小:11px;填充底部:20px;}.mobile-dropdown-container a {行高:32px;-webkit-text-fill-color: #000 !important;-webkit-text-stroke:透明!重要;}.mobile-dropdown-container a:hover {颜色:#000 !重要;-webkit-text-stroke:透明!重要;}@media(最小宽度:736px){.mobilenav {显示:无;}.mobilenavcontainer {显示:无;}#mobilehead {显示:无!重要;}}

<header id="mobilehead"><img src="https://static1.squarespace.com/static/5c8e8d07a09a7e3c68de4c7b/t/5d07d5346b960f00012d395a/1560794420116/ck4%40300x.png" alt="Cathrine Khom" class="mobilehead"/></header><!-- 开始移动导航 --><div id="myMobilenav" class="mobilenav"><a href="javascript:void(0)" class="mobileclosebtn" onclick="closeMobile()"><img id="mobilecloseicon" src="https://static1.squarespace.com/static/5c8e8d07a09a7e3c68de4c7b/t/5d07e8d86b960f00012f1522/1560799448192/closeup%40300x.png"/></a><div class="mobilemainitems"><button class="mobile-dropdown-btn"><a href="#">Journal</a></button><div class="mobile-dropdown-container"><a href="/journal">all</a><a href="/journal?category=design">design</a><a href="/journal?category=fashion">fashion</a><a href="/journal?category=personal">personal</a><a href="/journal?category=swoon">swoon</a><a href="/journal?category=travel">travel</a>

<a href="/work">工作</a><a href="/about">关于</a><a href="#">联系方式</a>

<div class="mobilesocialitems"><div class="row1social"><a href="#" target="_blank">Twitter</a>&nbsp;&nbsp;&nbsp;<a href="#" target="_blank">Instagram</a>

<div class="row2social"><a href="#" target="_blank">Pinterest</a>&nbsp;&nbsp;&nbsp;<a href="#" target="_blank">杂志</a>&nbsp;&nbsp;&nbsp;<a href="#" target="_blank">Spotify</a>

<div class="mobilenavcontainer"><span class="mobilenav" onclick="openMobile()"><img id="mobilemenuicon" class="mobilemenuicon" src="https://static1.squarespace.com/static/5c8e8d07a09a7e3c68de4c7b/t/5d07d2bda40a8a1604/1560793789313/menudown%40300x.png"/></span>

<!-- 结束移动导航 -->

解决方案

不知道为什么要嵌套固定定位的元素,但无论出于何种原因,Safari 都因为它的图层而迷失了.

添加以下内容可以解决您在 Safari 和移动设备上的问题...

.mobilenavcontainer >.mobilenav {位置:相对;}

//BEGIN MOBILE NAV函数 openMobile() {document.getElementById("myMobilenav").style.width = "100%";document.getElementById("myMobilenav").style.borderLeft = "none";}函数 closeMobile() {document.getElementById("myMobilenav").style.width = "0";document.getElementById("myMobilenav").style.borderLeft = "none";}//结束移动导航//移动下拉菜单//* 遍历所有下拉按钮以在隐藏和显示其下拉内容之间切换\*/var dropdown = document.getElementsByClassName("mobile-dropdown-btn");变量 i;for (i = 0; i < dropdown.length; i++) {dropdown[i].addEventListener("click", function() {this.classList.toggle("mobileactive");var dropdownContent = this.nextElementSibling;if (dropdownContent.style.display === "block") {dropdownContent.style.display = "无";} 别的 {dropdownContent.style.display = "block";}});}document.getElementById("myMobilenav").ontouchmove = function(e) {e.preventDefault();}

body {边距:0;}@media(最大宽度:735px){.nav {显示:无;}.navcontainer {显示:无;}header.Header.Header--top {显示:无;}}/* 结束主要导航风格 */.mobilehead {宽度:120px!重要;显示:块;左边距:10px;填充顶部:-10px;}#mobilehead {宽度:100%;高度:80px;背景颜色:#e9e5fb;边框底部:实心 1px #000;底边距:80px;}/* 开始移动导航风格 */.mobilenavcontainer {高度:100%;宽度:0px;背景颜色:#e9e5fb;位置:固定;顶部:0;右:0;z-索引:997;}.mobilenavcontainer >.mobilenav {位置:相对;}#mobilemenuicon {宽度:80px;高度:自动;z-索引:5000;}.mobilenav .mobilemenuicon {顶部:20px;右:18px;位置:固定;z-index:50000;}#mobilecloseicon {宽度:80px;}.mobilenav .mobileclosebtn {顶部:20px;右:18px;左边距:10px;位置:绝对;}.mobilenav {高度:100%;宽度:0;位置:固定;z-索引:1000;顶部:0;右:0;背景颜色:#e9e5fb;溢出:隐藏;填充顶部:120px;字体系列:AmerigoBT";}.mobilemainitems a {文字装饰:无;字体大小:3em;颜色:#000;显示:块;-webkit-text-stroke: .75px #000;-webkit-text-fill-color: #e9e5fb;行高:50px;宽度:180px;}.mobilemainitems {padding-left: 30px;填充顶部:0px;边距顶部:-96px;}.mobilesocialitems a {文字装饰:无;字体大小:1.5em;颜色:#000;显示:内联块;字体粗细:400;}.mobilesocialitems {padding-left: 30px;行高:35px;顶部:480px;位置:绝对;}.row1social {padding-left: 50px;显示:块;宽度:250px!重要;}/* 下拉按钮 */.mobile-dropdown-btn {字体系列:AmerigoBT";文字装饰:无;字体大小:18px !重要;颜色:#000;显示:块;过渡:0.3s;行高:54px;边界:无;背景:无;宽度:200px;文本对齐:左;大纲:无;margin-left: -11px !important;填充底部:5px;}/* 活动下拉按钮的活动类 */.mobileactive 一个 {背景颜色:无;-webkit-text-stroke: .75px #000 !important;-webkit-text-fill-color: #e9e5fb !important;}/* 下拉容器 */.mobile-dropdown-container {显示:无;背景颜色:无;padding-left: 20px;字体系列:UniversEx";字体大小:11px;填充底部:20px;}.mobile-dropdown-container a {行高:32px;-webkit-text-fill-color: #000 !important;-webkit-text-stroke:透明!重要;}.mobile-dropdown-container a:hover {颜色:#000 !重要;-webkit-text-stroke:透明!重要;}@media(最小宽度:736px){.mobilenav {显示:无;}.mobilenavcontainer {显示:无;}#mobilehead {显示:无!重要;}}

<header id="mobilehead"><img src="https://static1.squarespace.com/static/5c8e8d07a09a7e3c68de4c7b/t/5d07d5346b960f00012d395a/1560794420116/ck4%40300x.png" alt="Cathrine Khom" class="mobilehead"/></header><!-- 开始移动导航 --><div id="myMobilenav" class="mobilenav"><a href="javascript:void(0)" class="mobileclosebtn" onclick="closeMobile()"><img id="mobilecloseicon" src="https://static1.squarespace.com/static/5c8e8d07a09a7e3c68de4c7b/t/5d07e8d86b960f00012f1522/1560799448192/closeup%40300x.png"/></a><div class="mobilemainitems"><button class="mobile-dropdown-btn"><a href="#">Journal</a></button><div class="mobile-dropdown-container"><a href="/journal">all</a><a href="/journal?category=design">design</a><a href="/journal?category=fashion">fashion</a><a href="/journal?category=personal">personal</a><a href="/journal?category=swoon">swoon</a><a href="/journal?category=travel">travel</a>

<a href="/work">工作</a><a href="/about">关于</a><a href="#">联系方式</a>

<div class="mobilesocialitems"><div class="row1social"><a href="#" target="_blank">Twitter</a>&nbsp;&nbsp;&nbsp;<a href="#" target="_blank">Instagram</a>

<div class="row2social"><a href="#" target="_blank">Pinterest</a>&nbsp;&nbsp;&nbsp;<a href="#" target="_blank">杂志</a>&nbsp;&nbsp;&nbsp;<a href="#" target="_blank">Spotify</a>

<div class="mobilenavcontainer"><span class="mobilenav" onclick="openMobile()"><img id="mobilemenuicon" class="mobilemenuicon" src="https://static1.squarespace.com/static/5c8e8d07a09a7e3c68de4c7b/t/5d07d2bda40a8a1604/1560793789313/menudown%40300x.png"/></span>

<!-- 结束移动导航 -->

This is the mobile menu I have created for window sizes of 735px or less. The mobile menu icon (top right corner) doesn't show up in Safari on desktop or any mobile browsers (including Chrome and Safari). I have a feeling I might be overlooking something obvious, but I just can't figure it out.

Could it be something to do with overflow:hidden? I found that if I disable it in my class .mobilenav, the menu icon shows up, but obviously, the close icon does as well. If this is the root of the problem, how can I fix it while keeping the menu's functionality intact?

Browsers it works in on desktop: Chrome 75.0.3770.142, Firefox 68.0, Edge 42.17134.1.0 Browsers it doesn't work in on desktop: Safari 12.1.1 On mobile, it doesn't seem to work in any browser. I checked both Safari and Chrome.

// BEGIN MOBILE NAV
function openMobile() {
  document.getElementById("myMobilenav").style.width = "100%";
  document.getElementById("myMobilenav").style.borderLeft = "none";
}

function closeMobile() {
  document.getElementById("myMobilenav").style.width = "0";
  document.getElementById("myMobilenav").style.borderLeft = "none";
}
// END MOBILE NAV

//  MOBILE DROPDOWN
//* Loop through all dropdown buttons to toggle between hiding and showing its dropdown content\*/
var dropdown = document.getElementsByClassName("mobile-dropdown-btn");
var i;

for (i = 0; i < dropdown.length; i++) {
  dropdown[i].addEventListener("click", function() {
    this.classList.toggle("mobileactive");
    var dropdownContent = this.nextElementSibling;
    if (dropdownContent.style.display === "block") {
      dropdownContent.style.display = "none";
    } else {
      dropdownContent.style.display = "block";
    }
  });
}

document.getElementById("myMobilenav").ontouchmove = function(e) {
  e.preventDefault();
}

body {
  margin: 0;
}

@media (max-width:735px) {
  .nav {
    display: none;
  }
  .navcontainer {
    display: none;
  }
  header.Header.Header--top {
    display: none;
  }
}


/* END MAIN NAV STYLE */

.mobilehead {
  width: 120px !important;
  display: block;
  margin-left: 10px;
  padding-top: -10px;
}

#mobilehead {
  width: 100%;
  height: 80px;
  background-color: #e9e5fb;
  border-bottom: solid 1px #000;
  margin-bottom: 80px;
}


/* BEGIN MOBILE NAV STYLE */

.mobilenavcontainer {
  height: 100%;
  width: 0px;
  background-color: #e9e5fb;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 997;
}

#mobilemenuicon {
  width: 80px;
  height: auto;
  z-index: 5000;
}

.mobilenav .mobilemenuicon {
  top: 20px;
  right: 18px;
  position: fixed;
  z-index: 50000;
}

#mobilecloseicon {
  width: 80px;
}

.mobilenav .mobileclosebtn {
  top: 20px;
  right: 18px;
  margin-left: 10px;
  position: absolute;
}

.mobilenav {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  background-color: #e9e5fb;
  overflow: hidden;
  padding-top: 120px;
  font-family: "AmerigoBT";
}

.mobilemainitems a {
  text-decoration: none;
  font-size: 3em;
  color: #000;
  display: block;
  -webkit-text-stroke: .75px #000;
  -webkit-text-fill-color: #e9e5fb;
  line-height: 50px;
  width: 180px;
}

.mobilemainitems {
  padding-left: 30px;
  padding-top: 0px;
  margin-top: -96px;
}

.mobilesocialitems a {
  text-decoration: none;
  font-size: 1.5em;
  color: #000;
  display: inline-block;
  font-weight: 400;
}

.mobilesocialitems {
  padding-left: 30px;
  line-height: 35px;
  top: 480px;
  position: absolute;
}

.row1social {
  padding-left: 50px;
  display: block;
  width: 250px !important;
}


/* dropdown button */

.mobile-dropdown-btn {
  font-family: "AmerigoBT";
  text-decoration: none;
  font-size: 18px !important;
  color: #000;
  display: block;
  transition: 0.3s;
  line-height: 54px;
  border: none;
  background: none;
  width: 200px;
  text-align: left;
  outline: none;
  margin-left: -11px !important;
  padding-bottom: 5px;
}


/* active class for active dropdown button */

.mobileactive a {
  background-color: none;
  -webkit-text-stroke: .75px #000 !important;
  -webkit-text-fill-color: #e9e5fb !important;
}


/* dropdown container */

.mobile-dropdown-container {
  display: none;
  background-color: none;
  padding-left: 20px;
  font-family: "UniversEx";
  font-size: 11px;
  padding-bottom: 20px;
}

.mobile-dropdown-container a {
  line-height: 32px;
  -webkit-text-fill-color: #000 !important;
  -webkit-text-stroke: transparent !important;
}

.mobile-dropdown-container a:hover {
  color: #000 !important;
  -webkit-text-stroke: transparent !important;
}

@media (min-width:736px) {
  .mobilenav {
    display: none;
  }
  .mobilenavcontainer {
    display: none;
  }
  #mobilehead {
    display: none !important;
  }
}

<header id="mobilehead"><img src="https://static1.squarespace.com/static/5c8e8d07a09a7e3c68de4c7b/t/5d07d5346b960f00012d395a/1560794420116/ck4%40300x.png" alt="Cathrine Khom" class="mobilehead" /></header>

<!-- BEGIN MOBILE NAV -->
<div id="myMobilenav" class="mobilenav">
  <a href="javascript:void(0)" class="mobileclosebtn" onclick="closeMobile()"><img id="mobilecloseicon" src="https://static1.squarespace.com/static/5c8e8d07a09a7e3c68de4c7b/t/5d07e8d86b960f00012f1522/1560799448192/closeup%40300x.png" /></a>
  <div class="mobilemainitems">
    <button class="mobile-dropdown-btn"><a href="#">Journal</a></button>
    <div class="mobile-dropdown-container">
      <a href="/journal">all</a>
      <a href="/journal?category=design">design</a>
      <a href="/journal?category=fashion">fashion</a>
      <a href="/journal?category=personal">personal</a>
      <a href="/journal?category=swoon">swoon</a>
      <a href="/journal?category=travel">travel</a>
    </div>
    <a href="/work">Work</a>
    <a href="/about">About</a>
    <a href="#">Contact</a>
  </div>
  <div class="mobilesocialitems">
    <div class="row1social">
      <a href="#" target="_blank">Twitter</a>&nbsp;&nbsp;&nbsp;
      <a href="#" target="_blank">Instagram</a>
    </div>
    <div class="row2social">
      <a href="#" target="_blank">Pinterest</a>&nbsp;&nbsp;&nbsp;
      <a href="#" target="_blank">Magazine</a>&nbsp;&nbsp;&nbsp;
      <a href="#" target="_blank">Spotify</a>
    </div>
  </div>
</div>

<div class="mobilenavcontainer">
  <span class="mobilenav" onclick="openMobile()"><img id="mobilemenuicon" class="mobilemenuicon" src="https://static1.squarespace.com/static/5c8e8d07a09a7e3c68de4c7b/t/5d07d2bda44aaa000188164d/1560793789313/menudown%40300x.png"/></span>
</div>
<!-- END MOBILE NAV -->

解决方案

Not sure why you're nesting fixed positioned elements but for whatever reason Safari is getting lost with it's layers because of it.

Adding the following solves your problem on Safari and mobile...

.mobilenavcontainer > .mobilenav {
  position: relative;
}

// BEGIN MOBILE NAV
function openMobile() {
  document.getElementById("myMobilenav").style.width = "100%";
  document.getElementById("myMobilenav").style.borderLeft = "none";
}

function closeMobile() {
  document.getElementById("myMobilenav").style.width = "0";
  document.getElementById("myMobilenav").style.borderLeft = "none";
}
// END MOBILE NAV

//  MOBILE DROPDOWN
//* Loop through all dropdown buttons to toggle between hiding and showing its dropdown content\*/
var dropdown = document.getElementsByClassName("mobile-dropdown-btn");
var i;

for (i = 0; i < dropdown.length; i++) {
  dropdown[i].addEventListener("click", function() {
    this.classList.toggle("mobileactive");
    var dropdownContent = this.nextElementSibling;
    if (dropdownContent.style.display === "block") {
      dropdownContent.style.display = "none";
    } else {
      dropdownContent.style.display = "block";
    }
  });
}

document.getElementById("myMobilenav").ontouchmove = function(e) {
  e.preventDefault();
}

body {
  margin: 0;
}

@media (max-width:735px) {
  .nav {
    display: none;
  }
  .navcontainer {
    display: none;
  }
  header.Header.Header--top {
    display: none;
  }
}


/* END MAIN NAV STYLE */

.mobilehead {
  width: 120px !important;
  display: block;
  margin-left: 10px;
  padding-top: -10px;
}

#mobilehead {
  width: 100%;
  height: 80px;
  background-color: #e9e5fb;
  border-bottom: solid 1px #000;
  margin-bottom: 80px;
}


/* BEGIN MOBILE NAV STYLE */

.mobilenavcontainer {
  height: 100%;
  width: 0px;
  background-color: #e9e5fb;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 997;
}

.mobilenavcontainer > .mobilenav {
  position: relative;
}

#mobilemenuicon {
  width: 80px;
  height: auto;
  z-index: 5000;
}

.mobilenav .mobilemenuicon {
  top: 20px;
  right: 18px;
  position: fixed;
  z-index: 50000;
}

#mobilecloseicon {
  width: 80px;
}

.mobilenav .mobileclosebtn {
  top: 20px;
  right: 18px;
  margin-left: 10px;
  position: absolute;
}

.mobilenav {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  background-color: #e9e5fb;
  overflow: hidden;
  padding-top: 120px;
  font-family: "AmerigoBT";
}

.mobilemainitems a {
  text-decoration: none;
  font-size: 3em;
  color: #000;
  display: block;
  -webkit-text-stroke: .75px #000;
  -webkit-text-fill-color: #e9e5fb;
  line-height: 50px;
  width: 180px;
}

.mobilemainitems {
  padding-left: 30px;
  padding-top: 0px;
  margin-top: -96px;
}

.mobilesocialitems a {
  text-decoration: none;
  font-size: 1.5em;
  color: #000;
  display: inline-block;
  font-weight: 400;
}

.mobilesocialitems {
  padding-left: 30px;
  line-height: 35px;
  top: 480px;
  position: absolute;
}

.row1social {
  padding-left: 50px;
  display: block;
  width: 250px !important;
}


/* dropdown button */

.mobile-dropdown-btn {
  font-family: "AmerigoBT";
  text-decoration: none;
  font-size: 18px !important;
  color: #000;
  display: block;
  transition: 0.3s;
  line-height: 54px;
  border: none;
  background: none;
  width: 200px;
  text-align: left;
  outline: none;
  margin-left: -11px !important;
  padding-bottom: 5px;
}


/* active class for active dropdown button */

.mobileactive a {
  background-color: none;
  -webkit-text-stroke: .75px #000 !important;
  -webkit-text-fill-color: #e9e5fb !important;
}


/* dropdown container */

.mobile-dropdown-container {
  display: none;
  background-color: none;
  padding-left: 20px;
  font-family: "UniversEx";
  font-size: 11px;
  padding-bottom: 20px;
}

.mobile-dropdown-container a {
  line-height: 32px;
  -webkit-text-fill-color: #000 !important;
  -webkit-text-stroke: transparent !important;
}

.mobile-dropdown-container a:hover {
  color: #000 !important;
  -webkit-text-stroke: transparent !important;
}

@media (min-width:736px) {
  .mobilenav {
    display: none;
  }
  .mobilenavcontainer {
    display: none;
  }
  #mobilehead {
    display: none !important;
  }
}

<header id="mobilehead"><img src="https://static1.squarespace.com/static/5c8e8d07a09a7e3c68de4c7b/t/5d07d5346b960f00012d395a/1560794420116/ck4%40300x.png" alt="Cathrine Khom" class="mobilehead" /></header>

<!-- BEGIN MOBILE NAV -->
<div id="myMobilenav" class="mobilenav">
  <a href="javascript:void(0)" class="mobileclosebtn" onclick="closeMobile()"><img id="mobilecloseicon" src="https://static1.squarespace.com/static/5c8e8d07a09a7e3c68de4c7b/t/5d07e8d86b960f00012f1522/1560799448192/closeup%40300x.png" /></a>
  <div class="mobilemainitems">
    <button class="mobile-dropdown-btn"><a href="#">Journal</a></button>
    <div class="mobile-dropdown-container">
      <a href="/journal">all</a>
      <a href="/journal?category=design">design</a>
      <a href="/journal?category=fashion">fashion</a>
      <a href="/journal?category=personal">personal</a>
      <a href="/journal?category=swoon">swoon</a>
      <a href="/journal?category=travel">travel</a>
    </div>
    <a href="/work">Work</a>
    <a href="/about">About</a>
    <a href="#">Contact</a>
  </div>
  <div class="mobilesocialitems">
    <div class="row1social">
      <a href="#" target="_blank">Twitter</a>&nbsp;&nbsp;&nbsp;
      <a href="#" target="_blank">Instagram</a>
    </div>
    <div class="row2social">
      <a href="#" target="_blank">Pinterest</a>&nbsp;&nbsp;&nbsp;
      <a href="#" target="_blank">Magazine</a>&nbsp;&nbsp;&nbsp;
      <a href="#" target="_blank">Spotify</a>
    </div>
  </div>
</div>

<div class="mobilenavcontainer">
  <span class="mobilenav" onclick="openMobile()"><img id="mobilemenuicon" class="mobilemenuicon" src="https://static1.squarespace.com/static/5c8e8d07a09a7e3c68de4c7b/t/5d07d2bda44aaa000188164d/1560793789313/menudown%40300x.png"/></span>
</div>
<!-- END MOBILE NAV -->

这篇关于桌面或移动设备上的 Safari 中不显示菜单图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
前端开发最新文章
热门教程
热门工具
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆