Web standards: Nine, CSS form design

Source: Internet
Author: User

Web standards: Nine, CSS form design

Knowledge Points:

1. Change the text box and text field style 2. Use the picture to beautify the button 3. Change the drop-down list style 4. Enhance user experience with label Tags 1) Change text box and text field style text box Tags: <input type= "text" value= "class=" "> Add CSS styles to these text boxes and change their style: The final result is as follows: Text field Tags: <textarea id= "" class= "" rows= "5" cols= "> Website Construction Tutorials </textarea> Rows sets the number of lines that are displayed, the cols setting displays the width Overflow:auto, and the scroll bar does not appear when the content does not exceed the current height of the text field. Resize:none: Remove the small triangle in the lower right corner of the text field so that it cannot be pulled directly. Outline:none The border turns yellow when the selected text field is removed.  2) Use the picture to beautify the button button label: <input class= "B1" type= "button" value= "Submit" > Use the picture to beautify the button, you can directly tile a picture, but the picture does not add a border, so that you can adapt to the width. 3) Change the drop-down list style drop-down list: <select name= "Select" id= "select" class= "select" >
<option> Please select---------</option>
<option> Standard Road </option>
</select> because the drop-down list does not take effect for many styles, it is ugly on the page and is always on top of the IE6, causing many pop-up layers to not be obscured by him. For example, the drop-down list CSS style for, in IE9 and IE6 under the display as follows: IE9 under the display: IE6: Solution: Can be blocked floating layer using IFRAME, because the drop-down list will not run to the IFRAME. Higher requirements can be used in a div simulation instead of a drop-down list. 4) Use label label to enhance user experience label label:<label> name:</label> here is the main label positioning, click the label after the cursor location problem. Label targeting uses the For,for property to specify which form element the label binds to. Format is <label for= "value" > Name: </label>,value the ID code for the element to be bound is as follows: The display interface is as follows: NOTE: If you want to achieve the role of single-box mutex, that is, the mutual exclusion of radio, Just add the same name= "" value to them.

Web standards: Nine, CSS form design

Related Article

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.