-
Notifications
You must be signed in to change notification settings - Fork 0
/
tut107.html
78 lines (65 loc) · 2.09 KB
/
tut107.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
67
68
69
70
71
72
73
74
75
76
77
78
<!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 pseudo selectors</title>
</head>
<style>
container{
margin: 34px ,24px;
display: block;
width: 233px;
margin: auto;
}
input{
display:block
}
input[type='text']{
padding: 23px;
border: 2px solid red;
}
a[target='_self']{
font-size: 14px;
color: violet;
}
input[type='email']{
color: yellow;
border: 4px solid black;
}
/* this will applly css for third child */
li:nth-child(3){
color: cyan;
}
li:nth-child(2n+0){
color:red;
}
</style>
<body>
<div class="container">
align: center;
<h1><a href="http://google.com" target="-blank">Go to google</a></h1>
<h1><a href="http://facebook.com" target="-self">Go to facebook</a></h1>
<h1><a href="http://istagram.com" target=-blank>Go to istagram</a></h1>
<form action="" class="form control">
<input type="text" placeholder="Enter your name">
<input type="password"placeholder="Enter your password">
<input type="email" placeholder="Enter your email">
<input type="submit" placeholder="Enter your submit">
</form>
<ul>
<li class="item" id="item-1">item1</li>
<li class="item" id="item-2">item2</li>
<li class="item" id="item-3">item3</li>
<li class="item" id="item-4">item4</li>
<li class="item" id="item-5">item5</li>
<li class="item" id="item-5">item6</li>
<li class="item" id="item-5">item7</li>
<li class="item" id="item-5">item8</li>
<li class="item" id="item-5">item9</li>
<li class="item" id="item-5">item10</li>
</ul>
</div>
</body>
</html>