用css來投機(jī)取巧了。
去掉 .subNav 中的height
新增:
.nav>li .subNav li{
height:30px;
display:none;
}
.nav>li:hover .subNav li{
display:block;
}
完成了。
去掉 .subNav 中的height
新增:
.nav>li .subNav li{
height:30px;
display:none;
}
.nav>li:hover .subNav li{
display:block;
}
完成了。
2018-01-31
最新回答 / 慕萊塢833307
? clearInterval(This.time);-->在前;This.time=setInterval(function(){? -->在后先定義才行吧
2018-01-27
JavaScript是非常強(qiáng)大,也是必須學(xué)的,如今老師只是領(lǐng)進(jìn)門而已。不會用JavaScript實(shí)現(xiàn)該效果的,可以試試用CSS來實(shí)現(xiàn),不要僅僅局限在語言上。可以來圍觀我的一些總結(jié),2018,大家加油啊。地址:https://github.com/CruxF/IMOOC/tree/master/HTML_CSS
2018-01-11
練習(xí)的時候可以模仿老師,然后再根據(jù)自己的理解重新寫一套實(shí)現(xiàn)方法就好了嘛。說再多都不如動動手指,歡迎來圍觀,歡迎來批評,求大腿抱。地址:https://github.com/CruxF/IMOOC/tree/master/HTML_CSS
2018-01-11
這種實(shí)現(xiàn)方法其實(shí)已經(jīng)過時了,可以來看看我的簡單分析。地址:https://github.com/CruxF/IMOOC/tree/master/HTML_CSS
2018-01-11
超級老視頻啦,不過還是有很多看點(diǎn)的,可以來看看我的總結(jié)。地址:https://github.com/CruxF/IMOOC/tree/master/HTML_CSS
2018-01-11
覺得難的話,可以來看一下我的總結(jié),希望你們加油哈。地址:https://github.com/CruxF/IMOOC/tree/master/HTML_CSS
2018-01-11
<script>
var aA=document.getElementsByTagName("a")
for(var i=0;i<aA.length;i++){
aA[i].onmousemove=function(){
this.style.width=140+"px"
this.style.transition="all,1s"}
aA[i].onmouseout=function(){
this.style.width=100+"px"
this.style.transition="all,1s"}
}
</script>
var aA=document.getElementsByTagName("a")
for(var i=0;i<aA.length;i++){
aA[i].onmousemove=function(){
this.style.width=140+"px"
this.style.transition="all,1s"}
aA[i].onmouseout=function(){
this.style.width=100+"px"
this.style.transition="all,1s"}
}
</script>
2018-01-06
$(document).ready(function(){
$('li').hover(function(){
$(this).children().css('overflow','visible');
},function(){
$(this).children().css('overflow','hidden');
})
})
$('li').hover(function(){
$(this).children().css('overflow','visible');
},function(){
$(this).children().css('overflow','hidden');
})
})
2018-01-03