Blogger Information
Blog 38
fans 1
comment 0
visits 24338
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
4月25日作业CSS语法和常用选择器优先级
鲨鱼辣椒的博客
Original
577 people have browsed it
实例
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>CSS语法和常用选择器优先级</title>
	
</head>
<body>
	行内标签选择器
	<h3 style="background-color:aqua; color:red">样式规则 = 选择器 + 声明</h3>
<br>
	类选择器
	<h3 class="bg-red" style="background-color:red; color:royalblue">样式规则 = 选择器 + 声明</h3>
	id选择器
	<h3 id="id-blue" style="background-color:rgb(0, 255, 13); color:blueviolet">样式规则 = 选择器 + 声明</h3>

	<style>
			/* 类选择器 */
			.bg-red{
				background-color: black
			}
			/* ID选择器 */
			#id-blue{
				background-color: blue
			}
		</style>
</body>

</html>
运行实例 »
点击 "运行实例" 按钮查看在线实例


Correction status:Uncorrected

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post