この質問が以前に解決されたのを見たことがありますが、自分のサイトに修正を適用するのに問題があります。:hover
ポートフォリオサイトを構築しており、CSSトランジションを使用するナビゲーション要素を追加しています。私はブラウザ間でサイトをテストしてきましたが、デスクトップブラウザ間では正常に機能しますが、モバイルSafariは連携を拒否します(モバイルChromeとモバイルIEではクリックしてホバーすると正常に機能します)。iPhoneまたはiPadでは、ナビゲーションは完全に機能していません。誰かが助けることができれば大いに感謝します。サイトは次のとおりです:www.gabeweintraub.com。以下の関連コード:
(注:これは私の最初のWebプロジェクトなので、これに加えて、コードに困惑する穴の問題がたくさんあると思います。優しくしてください。)
HTML
<div class="splash_nav">
<ul>
<li><span>Ideas</span>
<ul>
<li><a href="/cgi-bin/blosxom.cgi">Blog</a></li>
<li><a href="http://twitter.com/GabeWeintraub">Twitter</a></li>
</ul>
</li>
<li><span>Projects</span>
<ul>
<li><a href="/gallery.html" >Art</a></li>
<li><a href="/code.html" >Code</a></li>
</ul>
</li>
<li><span>About</span>
<ul>
<li><a href="/bio.html">Bio</a></li>
<li><a href="/resume.html">Resume</a></li>
<li><a href="/contact.html">Contact</a></li>
</ul>
</li>
</ul>
</div>
</div>
<nav>
<div class="menu-item-2">
<h4>Ideas</h4>
<ul>
<li><a href="/cgi-bin/blosxom.cgi">Blog</a></li>
<li><a href="http://twitter.com/GabeWeintraub">Twitter</a></li>
</ul>
</div>
<div class="menu-item-2">
<h4>Projects</h4>
<ul>
<li><a href="/gallery.html">Art</a></li>
<li><a href="/code.html">Code</a></li>
</ul>
</div>
<div class="menu-item-3">
<h4>About</h4>
<ul>
<li><a href="/bio.html">Bio</a></li>
<li><a href="/resume.html">Resume</a></li>
<li><a href="/contact.html">Contact</a></li>
</ul>
</div>
</nav>
CSS
.splash_nav {
width: 500px;
position: relative;
top: 300px;
margin: 0 auto 2em;
padding: 0;
text-align: center;
}
.splash_nav li {
display: inline;
list-style: none;
}
.splash_nav li span {
display: inline;
list-style: none;
text-transform: uppercase;
text-decoration: none;
color: rgb(152,27,30);
font-size: 1.5em;
font-weight: 500;
height: 100px;
padding: 10px;
}
.splash_nav li a {
display: inline;
text-transform: uppercase;
text-decoration: none;
color: rgb(152,27,30);
font-weight: 500;
height: 100px;
}
.splash_nav li ul {
display: none;
}
.splash_nav li:hover ul, .splash_nav li.hover ul {
position: fixed;
display: block;
height: 80px;
width: 500px;
top: 340px;
margin: 0 auto 0;
text-align: center;
}
.splash_nav li:hover li, .splash_nav li.hover li {
position: relative;
-webkit-animation: fadeIn 2s;
-moz-animation: fadeIn 2s;
-ms-animation: fadeIn 2s;
}
.splash_nav li:hover li a, .splash_nav li.hover li a {
color: rgb(76,77,79);
font-size: 1em;
padding: 10px;
}
.splash_nav li li a:hover {
background: #eee;
}
@-webkit-keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@-moz-keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@-ms-keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
nav {
float: right;
line-height: 1.5;
padding-right: 70px;
}
.menu-item-1, .menu-item-2, .menu-item-3 {
background: #fff;
}
.menu-item-1 h4, .menu-item-2 h4, .menu-item-3 h4 {
color: rgb(152,27,30);
font-size: 1.5em;
font-weight: 500;
text-align: right;
}
.menu-item-1 h4 a, .menu-item-2 h4 a, .menu-item-3 h4 a {
color: rgb(152,27,30);
display: block;
text-decoration: none;
text-align: right;
text-transform: uppercase;
}
/*ul Styles*/
.menu-item-2 ul, .menu-item-3 ul {
background: #fff;
font-size: 1em;
line-height: 30px;
height: 0px;
list-style-type: none;
overflow: hidden;
text-transform: uppercase;
/*Animation*/
-webkit-transition: height 1.5s ease;
-moz-transition: height 1.5s ease;
-o-transition: height 1.5s ease;
-ms-transition: height 1.5s ease;
transition: height 1.5s ease;
}
.menu-item-3:hover ul {
height: 93px;
}
.menu-item-2:hover ul{
height: 62px;
}
.menu-item-2 ul a, .menu-item-3 ul a {
width: 150px;
text-decoration: none;
color: rgb(76,77,79);
display: block;
text-align: right;
padding-right: 20px;
}
/*li Styles*/
.menu-item-2 li, .menu-item-3 li {
border-bottom: 1px solid color: rgb(76,77,79);;
text-align: right;
}
.menu-item-2 li:hover, .menu-item-3 li:hover {
background: #eee;
text-align: right;
text-decoration: none;
}
ありがとうございました!