不好意思,刚才代码发错了,求大神指导,不然寝食难安,谢谢
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>淘宝网便民服务JS动画效果</title>
<style type="text/css">
*{
margin:0;
padding: 0;
}
#move{
overflow: hidden;
border:1px solid #A2385A;
margin:100px auto;
width: 414px;
height: 354px;
}
a{
color: #999;
font-weight: bold;
font-family: "微软雅黑";
margin:20px;
display: inline-block;
padding-top: 112px;
height: 25px;
width: 92px;
text-align: center;
position: relative;
float: left;
text-decoration: none;
/* overflow: hidden; */
}
a:hover{
color: #E55757;
text-decoration: underline;
}
i{
position: absolute;
top:20px;
left:0;
filter:alpha(opacity:100);
opacity: 1;
}
</style>
<script src="js/move_1.js"></script>
<script type="text/javascript">
window.onload=function(){
var div=document.getElementById('move'),
a=div.getElementsByTagName('a');
for(var i=0;i<a.length;i++){
a[i].onmouseover=function(){
var _this=this.getElementsByTagName('i')[0];
startmove(_this,{top:-25},function(){
startmove(_this,{top:20})
});
}
}
}
</script>
</head>
<body>
<div id="move">
<a href="#"><i><img src="images/Taobao_1.jpg"></i><p>华为手机</p></a>
<a href="#"><i><img src="images/Taobao_2.jpg"></i><p>苹果手机</p></a>
<a href="#"><i><img src="images/Taobao_3.jpg"></i><p>小米手机</p></a>
<a href="#"><i><img src="images/Taobao_4.jpg"></i><p>魅族手机</p></a>
<a href="#"><i><img src="images/Taobao_1.jpg"></i><p>金立手机</p></a>
<a href="#"><i><img src="images/Taobao_1.jpg"></i><p>三星手机</p></a>
</div>
</body>
</html>
现在在不加透明度的情况下,可以实现当鼠标滑过时图片向上偏移后回到原来的位置,但是前后加上透明度之后,透明度回不到opacity:1了,而且也看不到图片回到原来位置的效果,也就是说加了透明度之后没有效果,求指导,谢谢