Style Code')"; 2. ""; 3 , "@import "file path""."> How to introduce css style into asp-Front-end Q&A-php.cn

How to introduce css style into asp

青灯夜游
Release: 2023-01-07 11:45:00
Original
2897 people have browsed it

Method: 1. "Response.write('')"; 2. " "; 3. "@import "File path"".

How to introduce css style into asp

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('')
Copy after login

2. Use the link tag to introduce

and write the following statement in the asp file that needs to be called:

Copy after login

3. Use @import to import

Write the following statement in the asp file that needs to be called:

Copy after login

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

Copy after login

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:

Copy after login

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") }
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!