<br/>
Css (Cascading Style Sheets, cascading style sheets) is a page beautification method that achieves the effect of beautifying the page by editing the object properties of Css. The basic unit of operation of CSS is an object. Using CSS feels like using a function in C++/C. CSS objects are like functions, which are used through definition, declaration, and call.
CSS has three selectors (object definition and usage methods): tag selector, category selector, ID selector
CSS has four inclusion methods: inline, embedded, link, and imported
Tag selector:
Definition: referenced style object name {tag attribute: attribute value; tag attribute: attribute value;…….}
eg: h1,h2{text-align: center; color: red } Tag attribute: attribute value; Tag attribute: attribute value;…….} or
. Class name {Tag attribute: attribute value; Tag attribute: attribute value; …….}
Label attribute: attribute value; : center; }
.right{ text-align: right; ;……..473f0a7621bec819994bb5020d29372a
(*Difference: The latter format means that all tags whose class attribute value is the class name comply with the style defined by the class)
(eg: .right{ is defined text-align: right;}, when called, as long as the label with the right attribute is called through class, the right attribute can be displayed. 5f0480b7d5aad05b906bce810986e357…..2e9b454fa8428549ca2e64dfac4625cd; 7858cd095555a7c6ae777affccdfedb5… 94b3e26ee717c64999d7867364b1b4a3;461141c9f2d5a7a09c17cd0c167af611…54bdf357c58b8a65c66d7c19c8e4d114; and other tags all show the right-aligned attribute)
. ID selector:
Definition: #id name {tag attribute: attribute value; tag attribute: attribute value;…….}
eg: #sample{font-family:宋体; don't-size:60pt;}
Use: 908c3e84dc2b2ed2acd063f70943e1c3……94b3e26ee717c64999d7867364b1b4a3
Inline:
No need to define a selector, use the style attribute to directly style the element
eg: 97034c9e3553717f3e6ec58a58a1c4ff...ee2bfd64228f824cf6027e0da2815b78
Embedded:
First define the selector and define the style sheet between 93f0f5c25f18dab9d176bd4f6de5d30e9c3bca370b5104690d9ef395f2c5f8d1. R EG: re
<html> <head> <title>xxxxxx</title> <style type=”text/css”> p{color: #000FF;} .info{font-size: 12px;} </syle> </head> </html>E Links: The object defined is placed in a file with a .css as an extension. , between 93f0f5c25f18dab9d176bd4f6de5d30e9c3bca370b5104690d9ef395f2c5f8d1. eg: 1bae5c5f4ef7c79273386b0982dac699Import: is similar to the link method, except that it is imported through the import method. eg: aefae21bbc7a4a6cbc13578aa0f535bd@import url(xxx.css);531ac245ce3e4fe3d50054a55f265927 Priority of CSS style sheet: Embedded style sheet> Linked style> External link style> Browser default
<br/>