<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=<device-width>, initial-scale=1.0">
<title>伪元素</title>
<style>
* {
margin: 0;
padding: 0;
}
section{
width: 900px;
height:100%;
background-color: rgb(203, 131, 24);
}
aside{
width: 200px;
height: 300px;
position: fixed;
top: 50%;
margin-top: -150px;
}
.leftaside{
left: 0;
}
.rightaside{
right: 0;
}
</style>
</head>
<body>
<section>
<img src="../images/bg.png">
<aside class="leftaside">
<img src="../images/left-aside.png">
</aside>
<aside class="rightaside">
<img src="../images/right-aside.png">
</aside>
</section>
</body>
</html>
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星