<!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>
#left{
width:600px;
height:600px;
background-color: aqua;
/* 绝对定位 */
position:absolute;
}
#right{
width :300px;
height:300px;
background-color: blueviolet;
/* 相对定位 */
position:relative;
/* 距离上面的距离 */
top: 20px;
/* 距离左边 */
left:80px;
}
</style>
</head>
<body>
<div id="left"></div>
<div id="right"></div>
</body>
</html>
08定位2020.3.9
猜你喜欢
转载自blog.csdn.net/weixin_43079958/article/details/105058562
今日推荐
周排行