-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbox-model.html
95 lines (79 loc) · 1.92 KB
/
box-model.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
95
<style>
button
{
padding-left: 10px;
padding-right: 10px;
padding-top: 7px;
padding-bottom: 7px;
vertical-align: top;
font-weight: bold;
cursor: pointer;
}
.subscribe-button
{
color: white;
background-color: red;
border: none;
border-radius: 3px;
margin-right: 15px;
transition: opacity 0.15s;
}
.subscribe-button:hover
{
opacity: 0.75;
}
.subscribe-button:active
{
opacity: 0.4;
}
.join-button
{
color: rgb(0, 0, 177);
background-color: white;
padding-top: 6px;
padding-bottom: 6px;
border-width: 1px;
border-radius: 3px;
border-color: rgb(0, 0, 177);
margin-right: 15px;
border-style: solid;
transition: background-color 0.15s, color 0.15s;
}
.join-button:hover
{
color: white;
background-color: rgb(0, 0, 177);
}
.tweet-button
{
border-radius: 20px;
border-width: 1px;
color: white;
background-color: rgb(10, 186, 255);
border-width: 1px;
border-color: rgb(10, 186, 255);
transition: box-shadow 0.15s;
}
.tweet-button:hover
{
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15s);
}
</style>
<button class="subscribe-button">
Subscribe
</button>
<button class="join-button">
Join
</button>
<button class="tweet-button">
Tweet
</button>
<!-- Explanation of the Box Model in HTML -->
<!--
The CSS box model describes the rectangular boxes generated for elements in the document tree.
It consists of:
1. Content: The innermost part of the box where the text or other elements are displayed.
2. Padding: The space between the content and the border. Padding is transparent and increases the size of the box without affecting its position.
3. Border: The border wraps around the padding (if any) and content. It can have various styles (solid, dashed, etc.) and widths.
4. Margin: The outermost layer that creates space between the element's border and neighboring elements. It is also transparent.
-->