鼠标经过时改变DIV背景颜色的三种途径

    xiaoxiao2021-12-10  7

    方法一:

    <div οnmοuseοver="this.style.backgroundColor='#F4F9FD'" οnmοuseοut="this.style.backgroundColor='#FFFFFF'"></div> 方法二:

    <style> .d_over{background-color:#307172;} .d_out{background-color:#EFEFEF;} </style> <div classdivclass="d_out" οnmοuseοver="this.className='d_over'" οnmοuseοut="this.className='d_out'">DIV背景颜色</div>

    转载请注明原文地址: https://ju.6miu.com/read-700224.html

    最新回复(0)