css| Tips | Web page First look at the following code:
<body>
<form name= "Form1" >
<input type= ' file ' name= ' file1 ' id= ' file1 ' style= ' Display:none ' >
<input id= ' Text1 ' style= ' border:1 solid ' black;height:22 ' >
<input type= ' button ' value= ' file ' style= ' border:1 solid '
Onclick= ' Document.all.file1.click (); document.all ("Text1"). Value=document.all ("File1"). Value; ' >
<input type= "button" value= "Onclick= ' document.getElementById" ("File1"). Click () ' >
<input type= "button" value= ">"
</form>
</body>
This just know that the original file domain can also be defined by scripting! But Firefox doesn't support it.
So I wrote a little about the form of the definition of the style, carefully studied the following:
1.form
First, the form has a boundary, a filler. Be sure to remember, or you will never find out where the problem is when you first start to learn.
2.input
Define the button is input when we can define its font color, border, background color. Only this definition of the word as if it is always not so vertically centered! But it doesn't affect the effect.
3.inputl Image beautification
When we want to beautify the button, we need to use the background, then note must not forget to define the border is none. Then you can define the pictures you like. Define its height and width. ※ When we write the value, be sure to write Chinese characters, and then define style text-indent:-9999px; so that you can hide the word, if it is English will be displayed, this situation is in IE, in Firefox does not exist in this situation, the other kind of feeling always if you value does not write values , in IE button on the very small, Firefox does not have this phenomenon. You can test yourself.
4. File domain
For a button that defines a file field, I divide the field into two parts, showing the text section A, button B, for easy clarity. We define the A,b border only, as well as part a background color, text color.
5. Text fields
This button, we can define the width, but the height is invalid. If you want to define a higher number can only define a larger font, such as the definition of a font size of 30px, then its height will increase accordingly.
The above discussion is not a script for the general situation. Let's write so much first.