使图片具有按下效果

.button{
    background: url(button_ok.gif) no-repeat;   
    border-style: none;
    event :expression(onmouseover = function(){this.style.background = 'url(button_okSel.gif) no-repeat';},onmouseout = function(){this.style.background = 'url(button_ok.gif) no-repeat';})
}

 

做两张图片,一个是正常效果,一个是按下效果,通过css event属性的 onmouseover和onmouseout的背景图片来控制

另外,图片的按下效果,不是图片在动,而是图片里的字在动

发布了44 篇原创文章 · 获赞 5 · 访问量 9万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章