<!DOCTYPE html>
<html lang="zh">
<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的id选择器</title>
<style type="text/css">
div{
color: slategrey;
}
#div1{
color: #00FFFF;
}
#div2{
color: antiquewhite;
}
#p1{
color: chartreuse;
}
</style>
</head>
<body>
<div id="div1">
我在学习前端
</div>
<br>
<div id="div2">
我很开心
</div>
<br>
<div id="">
今天的天气很好
</div>
<br>
<p id="p1">我相信我可以把前端学的很棒!</p>
</body>
</html>
CSS---id选择器练习示例代码
最新推荐文章于 2023-02-28 01:30:00 发布