CSS里也写脚本

来源:互联网 发布:mariadb与mysql 兼容 编辑:程序博客网 时间:2024/05/20 15:37

<style type="text/css">
.showCSS
{
    event:expression(
    onmouseover = function()
    {
        this.style.backgroundColor='#ff0000'
    },
    onmouseout = function()
    {
        this.style.backgroundColor='#ffffff'
    }
    )
}
</style>

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

原创粉丝点击