发新话题
打印

能否把onmouseover事件写在css文件里面?

.showCSS{
event:expression(
onmouseover = function()
{
this.style.backgroundColor='#f0f0f0'
},
onmouseout = function()
{
this.style.backgroundColor='#ffffff'
}
)
}

<div class="showCSS">把鼠标放上去试试看!:)</div>

TOP

发新话题