@@ -44,6 +44,12 @@
.box3 img{
width: 150px;
}
+ .box4{
+ width: 100px;
+ height: 100px;
+ background-color: purple;
+ border-radius: 10px;
+ }
</style>
</head>
<body>
@@ -57,5 +63,8 @@
<div class="box3">
<img src="./img/img1.jpg" alt="">
</div>
+ <!-- <hr> 横线-->
+ <hr>
+ <div class="box4"></div>
</body>
</html>
@@ -6,7 +6,7 @@
<title>Document</title>
<style>
/* 伪类选择器 */
- li:first-child{
+ /* li:first-child{
color: red;
li:last-child{
@@ -14,7 +14,18 @@
li:nth-child(3){
color: yellow;
- }
+ } */
+ /* odd 选中奇数标签 */
+ /* li:nth-child(odd){
+ color: red;
+ /* even 选中偶数标签 */
+ li:nth-child(even){
+ li:hover{
+ color: blue;