本文主要是介绍用CSS控制onmouseover/out的背景颜色的方法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
onmouseover: expression(οnmοuseοver=function (){this.style.borderColor =''; this.style.color='';this.style.backgroundColor ='#99E2FB'});onmouseout: expression(οnmοuseοut=function (){this.style.borderColor=''; this.style.color='';this.style.backgroundColor =''});background-color:#00BFFF;
简单实用,这样在你更换样式的时候就不必再动程序页面,一个CSS搞掂
<style type="text/css"> .JsInCss{ event:expression( onmouseover = function() { this.style.backgroundColor='#f0f0f0' sotuku.style.display='' }, onmouseout = function() { this.style.backgroundColor='#ffffff' sotuku.style.display='none' } ) } </style>
这篇关于用CSS控制onmouseover/out的背景颜色的方法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!