1. CSS import:
First, put the CSS document in the <Style type = "text/CSS"> ...... </Style>
In <style>, "type = 'text/CSS '" indicates Code Is to define the style form.
The second method is to write the CSS style sheet in the HTML row, for example, the following code:
<P style = "font-size: 14pt; color: Blue"> Blue 14 text </P>
The style is written in any row in HTML in the format of <style = "">, which is convenient and flexible.
The third method is to save the edited CSS document as a ". CSS" file and define it in <Head> <LINK rel = stylesheet href?“style.css "> ...... </Head>
We can see that a <link> is applied here. "rel = stylesheet" indicates that the connected element is a style sheet document. Generally
You do not need to change it.
The subsequent href='style.css 'refers to the file address to be connected. You only need to write the detailed path name of the edited ". CSS" file
You can. This method is suitable for defining multiple documents at the same time. It allows multiple documents to use the same style at the same time, thus reducing a large amount of redundancy.
Code.
Fourth, <! -- # Include file = "/temp/CSS. aspx "-->, put it in > ...... </Style>.
2. I learned a new trick on the internet today to make the widget color gradient.
<Style type = "text/CSS">
<! --
. Test {filter: progid: DXImageTransform. Microsoft. gradient (startcolorstr = 'white', endcolorstr = 'red', gradienttype = '1 ');}
-->
Startcolorstr is the start color, endcolorstr is the end color, gradienttype, 0 is from top to bottom, 1 is from left to right
3. Oh, and,
. Tableborder
{
/* This is the User-Defined selector. Pay attention to the above. This is the user-defined method! */
Background-color: # e1fdee;/* Background Color */
Border: 1px solid # ff0000;
}
When you call a custom selector, you only need to add class = tableborder to its HTML Tag (the name of your custom selector.