-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap_practice_29_sizing.html
82 lines (74 loc) · 2.66 KB
/
bootstrap_practice_29_sizing.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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="bootstrap-4.0.0-dist/css/bootstrap.min.css">
<title>Sizing</title>
</head>
<body>
<div class = "container">
<h2>Width</h2>
<div class = "w-auto p-3" style = "background-color: #aaa;">
Width : auto
</div>
<br>
<div class = "w-100 p-3" style = "background-color: #aaa;">
Width : 100%
</div>
<br>
<div class = "w-75 p-3" style = "background-color: #aaa;">
Width : 75%
</div>
<br>
<div class = "w-50 p-3" style = "background-color: #aaa;">
Width : 50%
</div>
<br>
<div class = "w-25 p-3" style = "background-color: #aaa;">
Width : 25%
</div>
<br>
<h2>Height</h2>
<div class = "bg-secondary" style = "height: 100px; ">
<div class = "h-100 d-inline-block bg-info" style = "width: 120px;">
Height : 100%
</div>
<div class = "h-75 d-inline-block bg-info" style = "width: 120px;">
Height : 75%
</div>
<div class = "h-50 d-inline-block bg-info" style = "width: 120px; ">
Height : 50%
</div>
<div class = "h-25 d-inline-block bg-info" style = "width: 120px;">
Height : 25%
</div>
<div class = "h-auto d-inline-block bg-info" style = "width: 120px;">
Height : auto
</div>
</div>
</div>
<div class = "container">
<h2>Max Width</h2>
<img class = "mw-100"
src = "https://www.q1ins.com/wp-content/uploads/2016/09/black-transparent-box.png"
alt = "Max-width 100%">
<br>
<br>
<h2>Max Height</h2>
<div class = "bg-secondary" style = "height: 100px;">
<div class = "mh-100 bg-info" style = "width: 100px; height: 200px;">
Max-height : 100%
</div>
</div>
</div>
<script src = "https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity = "sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin = "anonymous">
</script>
<script src = "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
integrity = "sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
crossorigin = "anonymous">
</script>
<script src = "bootstrap-4.0.0-dist/js/bootstrap.min.js">
</script>
</body>
</html>