How to import css into jsp

青灯夜游
Release: 2021-07-05 15:49:45
Original
1437 people have browsed it

Method: 1. Use the style attribute inside the tag to add a style; 2. Use "" to add a style; 3. Use "" to add a style.

How to import css into jsp

The operating environment of this tutorial: windows7 system, CSS3, Dell G3 computer.

Adding css styles to jsp is the same as adding html. There are three ways:

  • Inline styles, using the styles attribute

  • Internal style, use the styleb tag

  • External style, use the link tag

## 1. Inline styles

When a 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 lose many of the advantages of style sheets by mixing presentation with content. Please use this method with caution! !

<div style="width:100px"></div>
Copy after login

2. Internal styles

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