1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
*{ margin: 0; padding: 0; list-style: none;}
ul{
width: 600px;
height: 600px;
margin:0 auto;
}
ul li{ width:300px;
height: 300px;
float: left;
background-color: red;
}
li:first-child{background-color: blue;}
li:first-child:hover{background-color: pink;}
li:nth-child(2){ background-color: yellow;}
li:nth-child(2):hover{ background-color: red;}
li:nth-child(3){ background-color: red;}
li:nth-child(3):hover{ background-color: yellow;}
li:last-child{ background-color: pink;}
li:last-child:hover{ background-color: blue;}