欢迎来到天天文库
浏览记录
ID:78398942
大小:17.26 KB
页数:3页
时间:2022-02-02
《css鼠标事件 [css设置鼠标事件] 》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、本文格式为Word版,下载可任意编辑css鼠标事件[css设置鼠标事件]怎么设置鼠标样式?不知道的话由我带你了解。css设置鼠标大事几种鼠标触发CSS大事。说明:onMouseDown按下鼠标时触发onMouseOver鼠标经过时触发onMouseUp按下鼠标松开鼠标时触发onMouseOut鼠标移出时触发onMouseMove鼠标移动时触代码如下:htmlheadtitleCSS鼠标响应大事/titlemetahttp-equiv=Content-Typecontent=text/html;charset=gb2312styletype=text/css.Off{background-c
2、olor:#00FF66;padding:100px;}.up{background-color:#FF0000;padding:100px}/style/headbodyulclass=OffonMouseOut=this.className=OffonMouseOver=this.className=Uph4鼠标响应大事当鼠标经过移出时切换css/h4lionMouseDown按下鼠标时触发lionMouseOver鼠标经过时触发第3页共3页本文格式为Word版,下载可任意编辑lionMouseUp按下鼠标松开鼠标时触发lionMouseOut鼠标移出时触发lionMouseMove鼠
3、标移动时触发/li/ul/body/html代码如下:spanstyle=color:red;鼠标经过表格变色样式:br/span复制代码代码如下:styletable{background-color:#000000;cursor:hand;width:100%;}td{/设置onmouseover大事/onmouseover:expression(onmouseover=function(){this.style.borderColor=blue;this.style.color=red;this.style.backgroundColor=yellow});/设置onmouseout
4、大事/onmouseout:expression(onmouseout=function(){this.style.borderColor=;this.style.color=;this.style.backgroundColor=});background-color:#ffffff;}/style掌握表格隔行变色:简洁应用:styletype=text/css第3页共3页本文格式为Word版,下载可任意编辑!--tr{background-color:expression((this.sectionRowIndex%2==0)?#E1F1F1:#F0F0F0)}--高级应用:每个单元格
5、变色styletype=text/css!--tr{background-color:expression((this.sectionRowIndex%2==0)?red:blue)}td{background-color:expression((this.cellIndex%2==0)?:((this.parentElement.sectionRowIndex%2==0)?green:yellow))}--/style第3页共3页
此文档下载收益归作者所有