Article Directory
First, what is the CSS
- Cascading Style Sheets (Cascading Style Sheets)
- Style: How to display HTML elements
- Stack: style-priority, high priority conflict to prevail
Can be seen from the definition, CSS syntax unit is a style that specifies how to display HTML elements
Two, CSS style composition
Two main parts: a selector, and one or more declarations
FIG
interpretation FIG.
Third, for example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
body{
/*body中字体大小*/
font-size: 24px;
}
p{
/*p标签背景颜色为黄色*/
background-color: yellow;
}
</style>
</head>
<body>
<p>我是一个段落标签</p>
</body>
</html>
display effect