-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathElement Box
120 lines (95 loc) · 2 KB
/
Element Box
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
CSS box model
div {
width: 300px;
border: 15px solid green;
padding: 50px;
margin: 20px;
}
div {
width: 320px;
padding: 10px;
border: 5px solid gray;
margin: 0;
}
CSS overflow model
div {
width: 200px;
height: 65px;
background-color: coral;
overflow: visible;
}
div {
overflow-x: hidden; /* Hide horizontal scrollbar */
overflow-y: scroll; /* Add vertical scrollbar */
}
Css Borders
p.dotted {border-style: dotted;}
p.dashed {border-style: dashed;}
p.solid {border-style: solid;}
p.double {border-style: double;}
p.groove {border-style: groove;}
p.ridge {border-style: ridge;}
p.inset {border-style: inset;}
p.outset {border-style: outset;}
p.none {border-style: none;}
p.hidden {border-style: hidden;}
p.mix {border-style: dotted dashed solid double;}
Creating a circle using borders
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
.dot {
height: 25px;
width: 25px;
background-color: #bbb;
border-radius: 50%;
display: inline-block;
}
Creating a elipse board
ellipse{
background-color: #45597e;
height: 100px;
width: 100px;
border-radius: 50%;
}
ellipse{
background-color: #45597e;
height: 100px;
width: 150px;
}
Block verses inline elements.
<p>Hello World</p>
<div>Hello World</div>
<div style="background-color:black;color:white;padding:20px;">
<h2>London</h2>
<p>London is the capital city of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.</p>
</div>
Css display property
p.ex1 {display: none;}
p.ex2 {display: inline;}
p.ex3 {display: block;}
p.ex4 {display: inline-block;}
.a {
display: contents;
border: 2px solid red;
background-color: #ccc;
padding: 10px;
width: 200px;
}
.b {
border: 2px solid blue;
background-color: lightblue;
padding: 10px;
}
Text Shadows
h1 {
text-shadow: 2px 2px #ff0000;
}
CSS box shadow
#example1 {
box-shadow: 5px 10px;
}
#example2 {
box-shadow: 5px 10px #888888;
}