-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path22-DisplayProperty.html
40 lines (36 loc) · 1.21 KB
/
22-DisplayProperty.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
div{
background-color: red;
width: 100px;
height: 100px;
display: inline-block; /*none, block, inline*/
visibility: hidden;
}
span{
background-color: blue;
width: 100px;
height: 100px;
display: inline-block;
}
</style>
</head>
<body>
<!--
display = property specifies if/how
an element is displayed
block-level = start on a new line, take up the fill width avaiable
(h1, div, p, form, header, footer)
inline = do not start on a new line, width is limited to what is needed
(span, a, img)
-->
<div>div</div>
<span>span</span>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Sapiente dolore cumque vel voluptatum ipsum aspernatur est, beatae, delectus dolorem voluptas, similique eaque quia id blanditiis ducimus perspiciatis illo molestiae dolores?
</body>
</html>