summaryrefslogtreecommitdiff
path: root/Base/res/html/misc/position-absolute-top-left.html
blob: 2c3601f8d13591d781835b2389b0aae8d13c2502 (plain)
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>absolute</title>
    <style>
        div {
            width: 100px;
            height: 100px;
        }
        .absolute {
            position: absolute;
        }
        .blue {
            width: 200px;
            height: 200px;
            background-color: blue;
            top: 208px;
            left: 208px;
        }
        .yellow {
            background-color: yellow;
            top: 50px;
            left: 50px;
        }
        .red {
            background-color: red;
            top: 100px;
            left: 100px;
        }
        .green {
            background-color: green;
            top: 300px;
            left: 300px;
        }
        .black {
            background-color: black;
            width: 50px;
            height: 50px;
            top: 50px;
            left: 50px;   
        }
        .blue_margin {
            width: 200px;
            height: 200px;
            background-color: blue;
            margin-top: 200px;
            margin-left: 400px;
        }
    </style>
</head>
<body>
    <div class="blue absolute">
        <div class="red absolute"></div>
        <div class="yellow absolute">
            <div class="black absolute"></div>
        </div>
        <div class="green absolute"></div>
    </div>
    <div class="blue">
        <div class="red"></div>
        <div class="yellow"></div>
        <div class="green"></div>
    </div>
    <div class="blue_margin"></div>
</body>
</html>