Style Code')"; 2. ""; 3 , "@import "file path"".">
Method: 1. "Response.write('')"; 2. " "; 3. "@import "File path"".
The operating environment of this tutorial: Windows 7 system, CSS3 version, Dell G3 computer.
asp method of introducing css style
1. Dynamic loading method
Response.write('')
2. Use the link tag to introduce
and write the following statement in the asp file that needs to be called:
3. Use @import to import
Write the following statement in the asp file that needs to be called:
It should be noted that the code for the @import import method must be located between
#asp uses css style
Just like a normal program, just add a class name to the element
Dynamic transformation:
In asp.net, sometimes it is necessary to dynamically transform CSS, for example, sometimes when making personalized pages, you can do this
1) Still need to Add the tag statement in the head tag:
2) After that, in the page where the CSS is to be replaced, use the following js code
void fuction { MyStyleSheet.Attributes.Add("href","/css/flostyle.css") }
3) The page can dynamically control the css file to be referenced. .
(Learning video sharing:css video tutorial)
The above is the detailed content of How to introduce css style into asp. For more information, please follow other related articles on the PHP Chinese website!