问题描述
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html;charset=GB2312"/><title>测试Button的css</title><metaname="author"content=""/><metaname="keywords"content=""/><metaname="description"content=""/><style>.btn_mouseout{#添加背景图片,图片来之互联网;background-image:url('http://www.baidu.com/img/logo-yy.gif');}.btn_mouseover{#给button按钮添加样式;BORDER-RIGHT:#7EBF4F1pxsolid;PADDING-RIGHT:2px;BORDER-TOP:#7EBF4F1pxsolid;PADDING-LEFT:2px;FONT-SIZE:15px;FILTER:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#ffffff,EndColorStr=#CAE4B6);BORDER-LEFT:#7EBF4F1pxsolid;CURSOR:hand;COLOR:black;PADDING-TOP:2px;BORDER-BOTTOM:#7EBF4F1pxsolid;}.btn{height:32px;width:80px;background-image:url(/images/btn.gif);background-repeat:no-repeat;cursor:pointer;color:#000000;font-weight:500;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;margin-top:16px;}</style></head><body><buttonclass=btn_mouseoutonmouseover="this.className='btn_mouseover'"onmouseout="this.className='btn_mouseout'"title="buttoncss样式按钮">buttoncss样式按钮</button><inputclass="btn"type="button"value="clearAll"name="button01"/></body></html>
解决方案
解决方案二:
button要添加css尤其是背景图片的添加要保证button的4个属性为0呵呵...