错误在哪里?
$(document).ready(function(){
$("#hidden").hover(
function(){
$("#menu>div#serie>div").show(slide("direction","bottom")400ms);
},
function(){
$("#menu>div#serie>div").hide(slide("direction","top")400ms);
}
);
});
#menu
{
margin-top:-10px;
margin-left:-10px;
width:100%;
height:150px;
background-color:#333;
position:fixed;
}
#menu>div
{
line-height:130px;
float:right;
background-color:none;
}
#menu>div>a
{
display:block;
padding-right:30px;
padding-top:20px;
padding-left:30px;
color:#2ba8f0;
font-family:arial;
text-decoration:none;
transition:color 400ms ease;
}
#menu>div#serie
{
width:140px;
height:140px;
background-color:none;
color:#2ba8f0;
text-align:center;
vertical-align:middle;
line-height:130px;
font-family:arial;
background-image:url(images/arrow.svg);
background-repeat:no-repeat;
transition:color 400ms ease;
}
#menu>div#serie>a
{
padding:30px;
}
#menu>div>a:hover
{
color:white;
}
#menu>div#serie:hover
{
height:auto;
background-color:none;
color:white;
}
#menu>div#serie>div>div
{
height:100px;
}
#menu>div#serie>div>div>a#dropdown
{
width:140px;
display:block;
color:2ba8f0;
line-height:120px;
vertical-align:middle;
text-align:center;
text-decoration:none;
background-color:#333;
-webkit-transition:background-color 400ms ease;
}
#menu>div#serie>div>div>a#dropdown:hover
{
background-color:#555;
color:white;
}
.logo
{
display:block;
width:150px;
height:150px;
background-image:url(images/logo.svg);
background-repeat:no-repeat;
float:left;
}
#menu>div#serie>div
{
height:400px;
margin-top:-25px;
display:none;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<header id="menu">
<div>
<a href="#"><b>Kontakt</b></a>
</div>
<div>
<a href="#"><b>FAQ</b></a>
</div>
<div class="serie" id="serie">
<h4 id="hidden">Postery</h4>
<div id="hidden" class="hidden">
<div>
<a id="dropdown" href="#"><b>Pre Fanúšikov</b></a>
</div>
<div>
<a id="dropdown" href="#"><b>Osobné</b></a>
</div>
<div>
<a id="dropdown" href="#"><b>Chceš jeden?</b></a>
</div>
</div>
</div>
<div class="serie" id="serie">
<h4 id="hidden">Série</h4>
<div id="hidden" class="hidden">
<div>
<a id="dropdown" href="#"><b>Minecraft</b></a>
</div>
<div>
<a id="dropdown" href="#"><b>Vlogy</b></a>
</div>
<div>
<a id="dropdown" href="#"><b>Ostatné</b></a>
</div>
</div>
</div>
<div>
<a href="#"><b>O mne</b></a>
</div>
<div>
<a href="#"><b>Domov</b></a>
</div>
<a class="logo" href="#">
</a>
</header>
<div>
<a href="#"><b>Kontakt</b></a>
</div>
<div>
<a href="#"><b>FAQ</b></a>
</div>
<div class="serie" id="serie">
<h4 id="hidden">Postery</h4>
<div id="hidden" class="hidden">
<div>
<a id="dropdown" href="#"><b>Pre Fanúšikov</b></a>
</div>
<div>
<a id="dropdown" href="#"><b>Osobné</b></a>
</div>
<div>
<a id="dropdown" href="#"><b>Chceš jeden?</b></a>
</div>
</div>
</div>
<div class="serie" id="serie">
<h4 id="hidden">Série</h4>
<div id="hidden" class="hidden">
<div>
<a id="dropdown" href="#"><b>Minecraft</b></a>
</div>
<div>
<a id="dropdown" href="#"><b>Vlogy</b></a>
</div>
<div>
<a id="dropdown" href="#"><b>Ostatné</b></a>
</div>
</div>
</div>
<div>
<a href="#"><b>O mne</b></a>
</div>
<div>
<a href="#"><b>Domov</b></a>
</div>
<a class="logo" href="#">
</a>
</header>
#menu
{
margin-top:-10px;
margin-left:-10px;
width:100%;
height:150px;
background-color:#333;
position:fixed;
}
#menu>div
{
line-height:130px;
float:right;
background-color:none;
}
#menu>div>a
{
display:block;
padding-right:30px;
padding-top:20px;
padding-left:30px;
color:#2ba8f0;
font-family:arial;
text-decoration:none;
transition:color 400ms ease;
}
#menu>div#serie
{
width:140px;
height:140px;
background-color:none;
color:#2ba8f0;
text-align:center;
vertical-align:middle;
line-height:130px;
font-family:arial;
background-image:url(images/arrow.svg);
background-repeat:no-repeat;
transition:color 400ms ease;
}
#menu>div#serie>a
{
padding:30px;
}
#menu>div>a:hover
{
color:white;
}
#menu>div#serie:hover
{
height:auto;
background-color:none;
color:white;
}
#menu>div#serie>div>div
{
height:100px;
}
#menu>div#serie>div>div>a#dropdown
{
width:140px;
display:block;
color:2ba8f0;
line-height:120px;
vertical-align:middle;
text-align:center;
text-decoration:none;
background-color:#333;
-webkit-transition:background-color 400ms ease;
}
#menu>div#serie>div>div>a#dropdown:hover
{
background-color:#555;
color:white;
}
.logo
{
display:block;
width:150px;
height:150px;
background-image:url(images/logo.svg);
background-repeat:no-repeat;
float:left;
}
#menu>div#serie>div
{
height:400px;
margin-top:-25px;
display:none;
}
$(document).ready(function(){
$("#hidden").hover(
function(){
$("#menu>div#serie>div").show(slide("direction","bottom")400ms);
},
function(){
$("#menu>div#serie>div").hide(slide("direction","top")400ms);
}
);
});
你能帮帮我吗?
抱歉我的英语不好。
答案 0 :(得分:1)
接近&#34; 400ms&#34;。两次。
$("#menu>div#serie>div").show(slide("direction","bottom")400ms);
应该像
$("#menu>div#serie>div").show(slide("direction","bottom"), "400");