批改状态:合格
老师批语:看前面的评语
绝对定位style样式
.panter{
position: relative;
width: 450px;
height: 450px;
border: 1px dashed green;
}
.box1{
width: 150px;
height: 150px;
background-color: dodgerblue;
}
.box2{
width: 150px;
height: 150px;
background-color: green;
}
.box3{
width: 150px;
height: 150px;
background-color: brown;
}
.box4{
width: 150px;
height: 150px;
background-color: aquamarine;
}
.box5{
width: 150px;
height: 150px;
background-color: blueviolet;
}
.box1{
position: absolute;
left: 150px;
}
.box2{
position: absolute;
left: 150px;
bottom: 150px;
}
.box3{
left: 300px;
top: 150px;
position: absolute;
}
.box4{
position: absolute;
left: 150px;
top: 300px;
}
.box5{
position: absolute;
top: 150px;
}点击 "运行实例" 按钮查看在线实例
绝对定位style样式
.panter{
position: relative;
width: 450px;
height: 450px;
border: 1px dashed green;
}
.box1{
width: 150px;
height: 150px;
background-color: dodgerblue;
}
.box2{
width: 150px;
height: 150px;
background-color: green;
}
.box3{
width: 150px;
height: 150px;
background-color: brown;
}
.box4{
width: 150px;
height: 150px;
background-color: aquamarine;
}
.box5{
width: 150px;
height: 150px;
background-color: blueviolet;
}
.box1{
position: absolute;
left: 150px;
}
.box2{
position: absolute;
left: 150px;
bottom: 150px;
}
.box3{
left: 300px;
top: 150px;
position: absolute;
}
.box4{
position: absolute;
left: 150px;
top: 300px;
}
.box5{
position: absolute;
top: 150px;
}点击 "运行实例" 按钮查看在线实例
绝对定位style样式
.panter{
position: relative;
width: 450px;
height: 450px;
border: 1px dashed green;
}
.box1{
width: 150px;
height: 150px;
background-color: dodgerblue;
}
.box2{
width: 150px;
height: 150px;
background-color: green;
}
.box3{
width: 150px;
height: 150px;
background-color: brown;
}
.box4{
width: 150px;
height: 150px;
background-color: aquamarine;
}
.box5{
width: 150px;
height: 150px;
background-color: blueviolet;
}
.box1{
position: absolute;
left: 150px;
}
.box2{
position: absolute;
left: 150px;
bottom: 150px;
}
.box3{
left: 300px;
top: 150px;
position: absolute;
}
.box4{
position: absolute;
left: 150px;
top: 300px;
}
.box5{
position: absolute;
top: 150px;
}点击 "运行实例" 按钮查看在线实例
绝对定位html页 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <link rel="stylesheet" href="static/css/style13.css"> </head> <body> <div class="panter"> <div class="box1">1</div> <div class="box2">2</div> <div class="box3">3</div> <div class="box4">4</div> <div class="box5">5</div> </div> </body> </html>
点击 "运行实例" 按钮查看在线实例
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号