-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlec32.html
66 lines (59 loc) · 1.77 KB
/
lec32.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Attribute and nth child Psuedo Selectors</title>
<style>
input {
display: block;
margin: 8px;
}
.container {
border: 2px solid rebeccapurple;
padding: 8px;
width: 500px;
margin: auto;
}
input[type='text'] {
border: 3px solid blue;
height: 40px;
}
a[target] {
color: rgb(8, 3, 3);
}
/* Css for a specific index numbered element */
/* li:nth-child(3){
color: sienna;
} */
/* li:nth-child(2n+0){
color: slategrey;
} */
/* Targetting even or odd child */
li:nth-child(even) {
background-color: tomato;
}
</style>
</head>
<body>
<div class="container">
<h1><a href="http://www.diaryofacrack.blogspot.com" target="_blank">Ghanashyam's Blog</a></h1>
<form action="#" class="form-control">
<input type="text" placeholder="Name">
<input type="password" placeholder="password">
<input type="submit">
</form>
<ul>
<li class="item" id="item1">tem1</li>
<li class="item" id="item2">Item2</li>
<li class="item" id="item3">Item3</li>
<li class="item" id="item4">Item4</li>
<li class="item" id="item1">tem1</li>
<li class="item" id="item2">Item2</li>
<li class="item" id="item3">Item3</li>
<li class="item" id="item4">Item4</li>
</ul>
</div>
</body>
</html>