Home > Web Front-end > HTML Tutorial > Description of some parameters of text input box in web design_HTML/Xhtml_Web page production

Description of some parameters of text input box in web design_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:45:17
Original
2103 people have browsed it

Text input boxes are used in general guestbooks, forums and other places, which are textarea in HTML language. Textarea contains many parameters. If you learn to use these parameters, you can modify the size and size of the text input box at will. Appearance, to achieve the effect you want, let’s introduce these parameters and how to use them.
1. cols, vertical columns. Without setting the style sheet, it represents the number of bytes that can fit in one line. For example, cols=60 means that a line can hold up to 60 bytes, which is 30 Chinese characters. Another thing to note is that the width of the text box is adjusted through this. Enter the value of cols, and then define the size of the input text font (if not defined, the default value will be used), then the width of the text box will be determined.
2. rows, horizontal columns. Indicates the number of rows that can be displayed. For example, rows=10 means that 10 rows can be displayed. If there are more than 10 lines, you need to drag the scroll bar to browse. (Same as above, the height of the text box is controlled through this.)
3. name, the name of the text box. This item is essential because it must be used when storing text.
4. Warp, when warp="off" means that the text area does not wrap automatically. Of course, if it is not written, it will wrap automatically by default. This parameter is generally used less frequently.
5. Style, this is a very practical parameter that can be used to set the background color of the text box, scroll bar color and form, border color, input font size and color, etc.
6. Class, generally used to call settings in external css.
Example 1: Set the number of rows of the text box to 40 and the number of columns to 10. The name is text. Expression form
Example 2: Cancel the scroll bar on the right side of the text box. Expression form . style="overflow:auto" means that the scroll bar will be automatically displayed when the input text exceeds the set number of lines.
Example 3: Set the background color of the text box. .
Example 4: In addition, setting the scroll bar color, border color, font size, color, line spacing, etc. of the text box can be set directly in style. However, these are generally set in CSS and can be called directly. The following is a piece of CSS setting code: it should be easier to understand. What is set in the textbox is the background color of the text box, the color and thickness of the upper, lower, left and right borders, and the size of the input font, etc.
.textbox { BACKGROUND: #BFCEDC; BORDER-TOP: #7F9DB9 1px solid; BORDER-LEFT: #7F9DB9 1px solid; BORDER-RIGHT: #7F9DB9 1px solid; BORDER-BOTTOM: #7F9DB9 1px solid; FONT-FAMILY: "宋体", "Verdana", "Arial", "Helvetica"; FONT-SIZE: 12px; TEXT-ALIGN: LIFT;}
Insert the above code between and . The name in class="" corresponds to the name of the setting to be used in css. Once you are familiar with these parameters, it will be very convenient to modify and beautify the text input box.
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template