js特效鼠标移到图片上时图片颜色减淡
我做的网页需要一种效果,我放在网站上的图片,当鼠标移到图片上时,图片看上去像变淡了一些,移开恢复原来的样子。...
我做的网页需要一种效果,我放在网站上的图片,当鼠标移到图片上时,图片看上去像变淡了一些,移开恢复原来的样子。
展开
3个回答
展开全部
<script type="text/javascript">
function setover(obj) {
obj.style['opacity'] = 0.5;
obj.style['filter'] = 'alpha(opacity=50)';
}
function setout(obj) {
obj.style['opacity'] = 1;
obj.style['filter'] = 'alpha(opacity=100)';
}
</script>
<img src="xxxxx" onmouseover="setover(this)" onmouseout="setout(this)" />
function setover(obj) {
obj.style['opacity'] = 0.5;
obj.style['filter'] = 'alpha(opacity=50)';
}
function setout(obj) {
obj.style['opacity'] = 1;
obj.style['filter'] = 'alpha(opacity=100)';
}
</script>
<img src="xxxxx" onmouseover="setover(this)" onmouseout="setout(this)" />
展开全部
<script
type="text/javascript">
function
setover(obj)
{
obj.style['opacity']
=
0.5;
obj.style['filter']
=
'alpha(opacity=50)';
}
function
setout(obj)
{
obj.style['opacity']
=
1;
obj.style['filter']
=
'alpha(opacity=100)';
}
</script>
<img
src="xxxxx"
onmouseover="setover(this)"
onmouseout="setout(this)"
/>
type="text/javascript">
function
setover(obj)
{
obj.style['opacity']
=
0.5;
obj.style['filter']
=
'alpha(opacity=50)';
}
function
setout(obj)
{
obj.style['opacity']
=
1;
obj.style['filter']
=
'alpha(opacity=100)';
}
</script>
<img
src="xxxxx"
onmouseover="setover(this)"
onmouseout="setout(this)"
/>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<script
type="text/javascript">
function
setover(obj)
{
obj.style['opacity']
=
0.5;
obj.style['filter']
=
'alpha(opacity=50)';
}
function
setout(obj)
{
obj.style['opacity']
=
1;
obj.style['filter']
=
'alpha(opacity=100)';
}
</script>
<img
src="xxxxx"
onmouseover="setover(this)"
onmouseout="setout(this)"
/>
type="text/javascript">
function
setover(obj)
{
obj.style['opacity']
=
0.5;
obj.style['filter']
=
'alpha(opacity=50)';
}
function
setout(obj)
{
obj.style['opacity']
=
1;
obj.style['filter']
=
'alpha(opacity=100)';
}
</script>
<img
src="xxxxx"
onmouseover="setover(this)"
onmouseout="setout(this)"
/>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询