class div html css 这段代码怎么加进去代码能使鼠标移到某个词处这组词就改颜色,还有背景也改色。
首页更精彩| 保暖套件馆| 秋冬被芯馆| 甜蜜婚庆馆| 超值套餐馆| 家居生活馆| 健康枕芯馆| 自助购物
回复讨论(解决方案)
这个没人愿意做这个么
有奖回答也没有人么
这个还是什么论坛不是了呢
把span换成A标签 加上 href="#" 属性
你看看是不是这效果
首页更精彩| 保暖套件馆| 秋冬被芯馆| 甜蜜婚庆馆| 超值套餐馆| 家居生活馆| 健康枕芯馆| 自助购物
无标题文档 function init(){
var color="";
var spans=document.getElementsByTagName("span");
for(var i=0;i spans[i].onmouseover=function(e){
if(document.defaultView&&document.defaultView.getComputedStyle){
color=document.defaultView.getComputedStyle(this).color;
}else{
color=this.currentStyle.color;
}
this.style.color="red";
}
spans[i].onmouseout=function(){
this.style.color=color;
}
}
}
window.onload=init;
script>
首页更精彩| 保暖套件馆| 秋冬被芯馆| 甜蜜婚庆馆| 超值套餐馆| 家居生活馆| 健康枕芯馆| 自助购物
这样试试
其他的自己加