<style> *{margin:0; padding:0} #move{ width:400px; height:300px; margin:10px auto; border:1px solid #ccc; } #move a{ display:inline-block; width:58px; height:25px; border:1px solid #ddd; border-radius:3px; background-color:#fff; text-align:center; margin:10px 17px; position:relative; padding-top:50px; color:#9c9c9c; font-size:12px; text-decoration:none; line-height:25px; overflow:hidden; } #move a i{ position:absolute; top:10px; left:0; display:inline-block; width:100%; text-align:center; filter:alpha(opacity=100); opacity:1; } #move a:hover{ color:#F00; } #move img{ border:none; } </style> <script src="all move.js"></script> <script> window.onload=function(){ var oMove=document.getElementById("move"); var oList=document.getElementsByTagName("a"); for(var i=0;i<oList.length;i++){ var _this=this.getElementsByTagName("i")[0]; oList[i].onmouseover=function(){ startMove(_this,{top:-15,opacity:0},function(){ _this.style.top=15+"px"; startMove(_this,{top:10,opacity:100}); }); } } } </script>
李晓健