-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCSS-border.html
78 lines (66 loc) · 1.8 KB
/
CSS-border.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 name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Border Property</title>
<style>
h1,
h3 {
text-align: center;
}
div {
margin: 5px;
padding: 5px;
border: 3px dashed green;
}
#bdr {
border-bottom: 3px dotted chocolate;
border-right: 4px double yellow;
}
code {
background-color: cyan;
color: tomato;
font-weight: bolder;
display: inline-block;
height: 90px;
line-height: 90px;
margin: 0 14px;
text-align: center;
width: 100px;
}
.border-rounded {
border-radius: 5px;
}
.border-circle {
border-radius: 50%;
}
.border-football {
border-radius: 15px 65px;
}
.rounded{
border-top-right-radius: 155px;
}
</style>
</head>
<body>
<h1>The Border Property</h1>
<div>
<p>Borders fall between the padding and margin, providing an outline around an element. The border property requires
three values: width, style, and color. Shorthand values for the border property are stated in that order—width,
style, color. In longhand, these three values can be broken up into the border-width, border-style, and
border-color properties. These longhand properties are useful for changing, or overwriting, a single border value.
</p>
</div>
<h3>Individual Border Sides</h3>
<div id="bdr">
<p>borders can be placed on one side of an element at a time if we’d like. Doing so requires new properties:
border-top, border-right, border-bottom, and border-left. </p>
</div>
<h3>Border Radius</h3>
<code class="border-rounded">5px</code>
<code class="border-circle">50%</code>
<code class="border-football">15px 75px</code>
<code class="rounded">155px</code>
</body>
</html>