This article mainly for you to share a CSS introduced four ways to summarize, with a good reference value, I hope to help you. Follow the small series together to see it, hope to help everyone.
1. Inline reference: Directly on the label, but with high maintenance costs
Style= ' Font-size:16px;color: #000000 '
2. External connection reference: CSS code is separated from HTML code for easy code re-use
<link href= "Css/style.css" type= "Text/css" rel= "stylesheet"/>
STYLE.CSS file content such as right:
. font{color:blue;font-size:12px;}
3. Internal reference: The page is clearer, but cannot be used by other pages
<style type= ' text/css ' > . font{color:blue;font-size:12px;} </style>
4. External import: You can import multiple style sheets in one HTML file. Similar to externally linked references
In the HTML file, add the head tag
<style type= ' text/css ' > @import url ('./style/style.css ');</style>
Have you learned it? Feel useful and hurry up and collect it.