Home Backend Development C#.Net Tutorial How to use Asp.Net-css style

How to use Asp.Net-css style

Nov 24, 2016 am 11:43 AM

The use of Css styles is roughly divided into three types


Let’s take a look at an overview picture first

How to use Asp.Net-css style

1 Use the form of connection to call


There are two ways to call:


A Use The link tag


writes the style rules in the .Css style document, and then introduces it with the tag

as follows:

Usually dragging the css file directly to the html page

Concentrate rel="stylesheet" means that the associated style between this link and href is a style sheet file. Type="text/css" means that the file type is a style sheet. The location where it is placed is usually in the

section of the web page.

How to use Asp.Net-css styleB Using @import to import

is just like importing a namespace. Place it in zai

STYLETYPE="text/css">

For example:

It should be noted that the semicolon at the end of the line is absolutely essential!

2 Use the style attribute

Add the style attribute directly to individual element tags or inline


The calling method is as follows:

name>

The syntax of the style is exactly the same as the syntax of the independent style. For example

The advantage of this usage is that it can be used flexibly in tags, but the disadvantage is that There is no unity of the entire document;

3 Use the style tag

Put the style within the style tag in the head element, at the same level as the body


The syntax is as follows:


[html]

Let’s demonstrate it with an example.


CSS calling method



Example: from the page header transfer.



Let’s demonstrate it with an example.

CSS calling method



Example: from the page header transfer.



Usually the entire structure is written in the part of the web page middle. The advantage of this usage lies in the uniformity of the entire document. As long as there is a declared component, the style rule will be applied. The disadvantage is the lack of flexibility in individual components.


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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to add next-level C compiler How to add next-level C compiler Mar 03, 2025 pm 05:44 PM

How to add next-level C compiler

What are the web versions of C language compilers? What are the web versions of C language compilers? Mar 03, 2025 pm 05:42 PM

What are the web versions of C language compilers?

Method of copying code by C language compiler Method of copying code by C language compiler Mar 03, 2025 pm 05:43 PM

Method of copying code by C language compiler

What are the alternatives to NULL in C language What are the alternatives to NULL in C language Mar 03, 2025 pm 05:37 PM

What are the alternatives to NULL in C language

Which C language compiler is better? Which C language compiler is better? Mar 03, 2025 pm 05:39 PM

Which C language compiler is better?

Is NULL still important in modern programming in C language? Is NULL still important in modern programming in C language? Mar 03, 2025 pm 05:35 PM

Is NULL still important in modern programming in C language?

C language online programming website C language compiler official website summary C language online programming website C language compiler official website summary Mar 03, 2025 pm 05:41 PM

C language online programming website C language compiler official website summary

C language compiler installation tutorial (computer version) C language compiler installation tutorial (computer version) Mar 03, 2025 pm 05:41 PM

C language compiler installation tutorial (computer version)

See all articles