-
Notifications
You must be signed in to change notification settings - Fork 12
/
css.html
94 lines (73 loc) · 1.74 KB
/
css.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS</title>
<script src="src/picoCSS.min.js" type="text/javascript"></script>
<script type="text/javascript">
function load(){
p.select("#a").on("click", function(){
p.select("#a").css("background-color:green;color:#fff;");
p.select("#b").css('-webkit-border-radius: 200px; background-color:red;');
p.select("#c").css('-webkit-border-radius: 200px;background-color:yellow;');
p.select("#d").css('-webkit-border-radius: 200px;background-color:green;');
p.select("#main").css('background-color:#222;');
})
}
window.addEventListener('load',load,false);
</script>
<style>
#a{
width: 100px;
background-color: #fff;
color:green;
cursor: pointer;
font-weight: bold;
line-height: 1;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-moz-box-shadow: 0 1px 3px #999;
-webkit-box-shadow: 0 1px 3px #999;
text-shadow: 0 -1px 1px #222;
border-bottom: 1px solid #222;
padding: 4px;
margin:10px 10px 40px 10px;
text-align:center;
}
#b,#c,#d{
float: left;
width: 200px;
height:200px;
margin:20px;
}
#b{
background-color: #333;
}
#c{
background-color: #666;
}
#d{
background-color: #999;
}
#main{
width: 240px;
background-color: transparent;
}
.clear{
clear:both;
}
</style>
</head>
<body>
<div id="a"> Click Me</div>
<div id="main">
<div id="b"></div>
<div class="clear"></div>
<div id="c"></div>
<div class="clear"></div>
<div id="d"></div>
<div class="clear"></div>
</div>
</body>
</html>