Summary of three methods for inserting css styles in jsp pages

1. External style

External style sheets can be used when styles need to be applied to many pages.

Specific format:

<head> <link rel="stylesheet" type="text/css" href="path/myCss.css"/> </head>

2. Internal style

Internal style sheets can be used when individual pages require special styles.

Specific format:

<head> <style type="text/css"> 样式 </style> </head>

3. Inline styles

Specifically, when an element uses CSS, you can use inline styles. Inline styles have the highest priority, followed by internal styles, and external styles have the lowest priority.

Specific format:

style="font-size:10px;font-color:#ff0000"

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325160599&siteId=291194637