Jqtransform Landscaping Form _jquery

Source: Internet
Author: User

Jqtransform, a jquery style plug-in written by DFC Engineering, is used to beautify form elements, easy to use, and able to beautify all form elements including Input,radio,textarea,select,checkbox.
Run Effect chart:

How to use:
1, add JavaScript references and CSS file references

<link rel= "stylesheet" type= "Text/css" href= "Jqtransform.css"/> <script type= "Text/javascript" src= " 
JS /jquery.js "></script> 
<script type=" Text/javascript "src=" Js/jquery.jqtransform.js "></" Script> 

2. Write HTML form structure

<form class= "Jqtransform" action= "#" method= "POST" > <p><label> user name: </label><input type= " Text "/></p> <p><label> password: </label><input type=" password "/></p> <p>&lt 
 ;label> Sex: </label><input type= "Radio" name= "Sex"/> <label style= "Width:auto" > Male </label> <input type= "Radio" name= "Sex"/> <label style= "Width:auto" > Women </label> </p> <p><label > Education:</label> <select> <option value= "1" > Dr. </option> <option value= "2" > Master ;/option> <option value= "3" > University undergraduate </option> <option value= "4" > College </option> <opti On value= "5" > Zjy </option> </select> </p> <p><label> SMS subscription: </label><input type= "checkbox"/> <label> Open SMS subscription function </label></p> <p><label> Memo:</label> < TextArea name= "Note" rows= "6" cols= "40" ></textarea> </p> <p><label> </label><input type= "Submit" value= "submitted"/> <in 
 Put type= "reset" value= "reset"/></p> </form>

3. Invoke Plugin

$ ('. Jqtransform '). Jqtransform (); 

A beautiful form came out, but a little bit of a flaw, jqtransform to IE under the Chinese form button support is not ideal, such as: Button value for English display normal, but many English words such as value for Sure,i submit! will drop line, If value is Chinese then it is more, "submit" two words vertical row, this is certainly not the effect I want. The solution is to start with a CSS style, find the Jqtransform.css file Button.jqtransformbutton, about 14 lines. Join:

Width:auto; 
White-space:nowrap; 

Sets the width of the button to Automatic, single line display. Of course you can also set a fixed width, you can also modify the CSS file custom form style.

The above is to tell you how to make the form more beautiful, is to use a simple jquery style plug-in, used to beautify the form elements, easy to use, I hope you can apply to their own web page production.

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.