覺得難的話,可以來看一下我的總結(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
.nav li a{ display:block;text-indent:20px;height:40px; line-height:40px; width:100px; background-color:#efefef; margin-bottom:2px;}
2018-01-03
aLi[i].onmouseover=function(){
var that = this.getElementsByClassName("subNav")[0];
var addHeight = 0;
var addEvt = setInterval(function(){
addHeight += 30;
if(addHeight > 120){ clearInterval(addEvt); };
that.style.height = addHeight + "px";
}, 20);
}
var that = this.getElementsByClassName("subNav")[0];
var addHeight = 0;
var addEvt = setInterval(function(){
addHeight += 30;
if(addHeight > 120){ clearInterval(addEvt); };
that.style.height = addHeight + "px";
}, 20);
}
2017-12-11
aLi[i].onmouseover=function(){
var that = this.getElementsByClassName("subNav")[0];
var addHeight = 0;
var addEvt = setInterval(function(){
addHeight += 30;
if(addHeight > 120){ clearInterval(addEvt); };
that.style.height = addHeight + "px"; }, 20);
}
var that = this.getElementsByClassName("subNav")[0];
var addHeight = 0;
var addEvt = setInterval(function(){
addHeight += 30;
if(addHeight > 120){ clearInterval(addEvt); };
that.style.height = addHeight + "px"; }, 20);
}
2017-12-11