最新回答 / 一地幽兰
background-position中的“0”表示背景开始的位置相对元素容器的左侧即水平方向的距离为0px,“-30px”则是垂直方向上相对于元素容器顶部向上移动了30px,如果是正数则是向下移动
2017-03-23
window.onload=function(){
var aA=document.getElementsByTagName("a");
for(var i=0;i<aA.llength;i++){
aA[ i].onmouseover=function(){
var This=this;
clearInterval(tihis.time);
This.time=setInterval(function(){
This.style.width=This.offsetWidth+8+"px";
if(ThisWidth>=160)
clearIntervall(This.time);},30)}
var aA=document.getElementsByTagName("a");
for(var i=0;i<aA.llength;i++){
aA[ i].onmouseover=function(){
var This=this;
clearInterval(tihis.time);
This.time=setInterval(function(){
This.style.width=This.offsetWidth+8+"px";
if(ThisWidth>=160)
clearIntervall(This.time);},30)}