May 31, 2021 Article blog
CSS is an abbreviation for Cascading Styke Sheet. i
s a marker language used (enhanced) to control the style of rendered pages and to allow CSS style information to run separately from page HTML content. C
SS does not require compilation and can be executed directly by the browser (which is the browser explanatory language). C
SS is a domain language (DSL) that overlaps and inherits to give CSS elegant and infinite creativity. I
t is precisely because it is so "simple", we need to learn it more fully, easy to use it, so that our web pages live flexible present.
CSS also supports a variety of devices, such as mobile phones, TVs, slideshows, printers, etc., but CSS has been better promoted in browsers.
selector{property:value; }
There are three ways to add style sheets to your page:
Inline is the style property definition that uses an object within an element's markup to define the style sheet properties that apply to it.
You can insert a
<style>
> object into the <
<head>
tag of your HTML document.
You can first establish an external style sheet file, .css, and then use HTML's link object. Or use the @import to introduce it.
<! - Using the LINK Element ->
<linkĀ rel="stylesheet" href="code.css">
<! - Use @Import ->
<style>
@importĀ url("demo.css")
</style>
Note: In real-world development, it is recommended to use HTML link objects for introduction.
The weights are divided into four levels:
style=""
with a weight of 1000
#content
the weight is 100
.content
with a weight of 10
div p
with a weight of 1
Follow these rules:
!important
rule is marked with the highest priority in the same set of property settings
The above is the use of CSS, CSS a variety of styles and so on you to explore, small compilation of the online popular courses and practice for you to strengthen learning