A simple example of how to use the three methods is as follows: Inline styles: <!doctype html> <html> <head> <meta charset="UTF-8"> <title>css inline style</title> </head> <body> <div style="width:100px;height:100px;background:red;"></div>> </body> </html> Inline styles: <!!doctype html> <html> <head> <meta charset="UTF-8"> <title>css embedded style</title> </head> <body> <style type="text/css"> #div{width:100px;height:100px;background:red;} </style> <div id="div"></div>> </body> </html> External type: <!doctype html> <html> <head> <meta charset="UTF-8"> <title>css embedded style</title> <link rel="stylesheet" type="text/css" href="ccss.css"> </head> <body> <div id="div"></div>> </body> </html> css file #div{width:100px;height:100px;background:red;} In short: Inline style: the code is written in an element on a specific web page; for example: <div style="color:#f00"></div> Inline: just write it before </head>; for example: <style type="text/css">.div{color:#F00}</style> External style: refers to an external CSS file; for example: <link href="css.css" type="text/css" rel="stylesheet" /> The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. |
<<: Detailed tutorial on installing CentOS, JDK and Hadoop on VirtualBox
>>: Newbies quickly learn the steps to create website icons
MySQL (5.6 and below) parses json #json parsing f...
This article shares the specific steps of install...
User Groups In Linux, every user must belong to a...
Table of contents 1. Self-enumerable properties 2...
Table of contents 0x01 Failed to load the driver ...
1. Mobile selection of form text input: In the te...
This article shares the specific code for Vue to ...
Vue+js realizes the fade in and fade out of the v...
1. Create a database authorization statement >...
Let's talk about some problems I have encounte...
Table of contents Tutorial Series 1. MySQL Archit...
Prerequisite: You need to compile the ngx_http_he...
Result:Implementation code: <!DOCTYPE html>...
React is an open-source JavaScript library used b...
The final solution is in the last picture If you ...