Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>PositionRelative</title>
- <style type="text/css">
- /*setting position:relative*/
- /*偏移量是相對其原本位置*/
- #box1 {width: 300px; height: 300px; background-color: red;
- position: relative; top: 50px; left: 50px;}
- #box2 {width: 300px; height: 300px; background-color: green;}
- #box3 {width: 300px; height: 300px; background-color: blue;}
- </style>
- </head>
- <body>
- <div id="box1">box1</div>
- <div id="box2">box2</div>
- <div id="box3">box3</div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement