控制input的CSS但不影響CheckBox以及Radio的樣式

來源:互聯網
上載者:User

但是checkbox radio等也會隨著變化了,往往就是這兩樣控制項顯示的很不如人意,就想:要是
能有一種可以改變其他input控制項的樣式而不影響checkbox和radio的方法就好.在網上找了
很久都沒有找到合適的代碼:無非就是增加一個樣式,然後將每個checkbox控制項都加一個class="xxx"
但這樣太麻煩.我經過測試和研究發現:expression((this.type!="checkbox")?(這樣可以實現,可以將以下
代碼拿到IE中測試一下.此方法在IE8中可行,但是沒測試過FireFox中是否可行, <meta name="Generator" content="EditPlus"><meta name="Author" content=""><meta name="Keywords" content=""><meta name="Description" content=""><br /><style> input { padding: 1px; font-family:Tahoma,Verdana, Arial, Helvetica, sans-serif; filter:expression((this.type!="checkbox")?("progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ddddee, EndColorStr=#FFFFFF)"):""); height:22px; font-size: 8pt; } </style><p><input type="text"><input type="checkbox"><input type="button" value="Please select">
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.