<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
/*--- id选择器--- */
#i1,#i2,#i3{
background-color: black;
color: white;
}
/*--- class选择器--- */
.c1,.c2,.c3{
background-color: black;
color: white;
}
/*--- 标签选择器--- */
div{
background-color: black;
color: white;
}
/*--- 层级选择器--- */
span div{
background-color: black;
color: white;
}
.c1 div{
background-color: black;
color: white;
}
/*--- 属性选择器--- */
input[type="text"]{width:100px; height:200px;}
.t1[type="password"]{width:100px; height:200px;}
</style>
</head>
<body>
<div class="c1">1</div>
<span class="c2">222222
<div>123</div>
222222</span>
<div class="c3">3</div>
<input type="text">
<input class="t1" type="password">
</body>
</html>
Python学习记录W14-18:css选择器
最新推荐文章于 2021-11-21 23:23:39 发布