Below is a CSS file I wrote to copy the following code to a writepiece *. CSS
Document, for example named 1024.css
/ * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------ * /. DataGrid {Font-Family: Verdana, Arial, Helvetica, Sans-Serif; Width: 100%; Border: Solid 1PX Blue; Table-Layout: fixed; border- Collapse: Separate;}. DG_Header {Font-Weight: bold; color: #ffff; background-color: # 4a3c8c; border: solid 1px red;}. dg_alter {background-color: # e7e7ff; border: solid 1px red;} .dg_item {color: # 330099; Background-color: # f7f7f7; border: solid 1px red;}. DG_Page {border: solid 1px red;}
Then add the following sentence to the HTML code of the ASPX file:
HREF = "../ CSS / 1024.CSS" type = "text" rel = "stylesheet">
Write DG_HEADERITEMSTYLE to write DG_HEADERITEMSTYLE in the CSSClass property in DataGrid's headerstyle, written DG_ITEM, etc. HREF = "../ css / 1024.css" type = "text" rel = "stylesheet"> disabled = "href =" ../ CSS / 1024.css "type =" text "Rel =" stylesheet "> is the DG_Header class in the reference style sheet, so you can set the style you want, just modify the CSS file.
For the first time, please pay more attention.