webveuje/csspress/demo/relative.html
2021-03-23 10:58:10 +08:00

35 lines
628 B
HTML

<!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>
* {
margin: 0;
padding: 0;
}
div{
width: 60px;
height: 60px;
}
.box1 {
background: yellow;
}
.box2 {
background: red;
position: relative;
top: 20px;
left: 30px;
}
</style>
</head>
<body>
<div class="box1">暖暖</div>
<div class="box2"></div>
</body>
</html>