1. Page embedding method:
<Style type = "text/CSS">
<! -- Body {Background: white; color: black;} -->
</Style>
You can specify the ID in the style so that other controls can directly call this style!
For example, <style type = "text/CSS" id = "gvcss">
Body {SCROLLBAR-FACE-COLOR: # f6f6f6; font-size: 9pt; SCROLLBAR-HIGHLIGHT-COLOR: # ffffff; SCROLLBAR-SHADOW-COLOR: # cccccc; SCROLLBAR-ARROW-COLOR: #330000; SCROLLBAR-DARKSHADOW-COLOR: # ffffff; text-Decoration: none; scrollbar-3: # cccccccc}
TD {font-size: 9pt; line-Height: 150%; font-family:}
Input {border-Right: #666666 1px solid; border-top: #666666 1px solid; font-size: 9pt; border-left: #666666 1px solid; color: #666666; border-bottom: #666666 1px solid; Height: 18px; Background-color: # ffffff}
</Style>
This. gridview1.cssclass = "gvcss ";
In C #, each control can define its style. Of course, we can also use C #Code. Use a self-written method.
2. External call method:
<LINK rel = "stylesheet" REV = "stylesheet" href = "CSS/style.css" type = "text/CSS" Media = "all"/>
When the CSS style has been defined for the file specified by href, C # automatically recognizes the Style Library. We only need to call the style name when using it. You can preview all available styles in HTML code.
3. Use the double table method to call CSS:
<LINK rel = "stylesheet" REV = "stylesheet" href = "CSS/style.css" type = "text/CSS" Media = "all"/> <style type = "text/ CSS "Media =" all "> @ import URL (CSS/style01.css ); </style>