Controls input CSS but does not affect checkbox and radio style _ form effects

Source: Internet
Author: User
But the checkbox radio and so on also will change, often is these two controls to display very unsatisfactory, thought: if
It's good to have a way to change the style of other input controls without affecting the checkbox and radio. I found it on the Internet.
Haven't found the right code in a long time: nothing more than add a style, and then add each CheckBox control to a class= "xxx"
But it's too much trouble. I have been tested and studied to find: expression (this.type!= "checkbox")? This allows you to implement the following
The code is tested in IE. this method is feasible in IE8, but it is not tested whether Firefox is feasible,
<textarea id="runcode67869"><! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" > <ptml> <pead> <title> New Document &L t;/title> <meta name= "generator" content= "EditPlus" > <meta name= "Author" content= "" > <meta name= "Key Words "content=" "> <meta name=" Description "content=" "> <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> </pead> <body> <input type=text> <input type=checkbox> <input Type=butto n value= "Please select" > </body> </ptml></textarea>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]

In addition, on the Internet, everyone thinks that input[type= "checkbox" is the style that Firefox supports
You can control the style of each control in input individually.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.