Home > Web Front-end > CSS Tutorial > Summary of three methods to analyze and insert css styles into jsp pages

Summary of three methods to analyze and insert css styles into jsp pages

高洛峰
Release: 2017-03-13 10:18:16
Original
1824 people have browsed it

This article mainly summarizes and introduces the three methods of inserting css styles into jsp pages. Friends in need can come and refer to it. I hope it will be helpful to everyone

1. External styles

When styles need to be applied to many pages, external style sheets will be the ideal choice. With external style sheets, you can change the look of your entire site by changing one file. Each page links to the style sheet using the tag. The tag is in the head (of the document):

<head>

2. Internal style

When a single document requires a special style, it Internal style sheets should be used. Internal style sheets can be defined at the head of the document using the

3. Inline styles

Inline styles will lose many of the advantages of style sheets due to the mixing of presentation and content. Use this approach with caution, for example when the style only needs to be applied once to an element. To use inline styles, you need to use the style attribute within the relevant tag. The Style property can contain any CSS property.

Inline styles have the

priority highest, followed by internal styles, and external styles have the lowest priority.​

The above is the detailed content of Summary of three methods to analyze and insert css styles into jsp pages. 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template