display:inline-block
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
*{margin: 0;padding: 0;}
html,body{width: 100%;height: 100%;}
.page{
width:1903px;
height:4033px;
background: url(http://img1.sycdn.imooc.com/climg//59c9f7ce0001839219034033.png)
center top;
}
.left{
width: 220px;
height: 360px;
background:url(http://img1.sycdn.imooc.com/climg//5a3383d00001a3dd02240364.png) no-repeat;
position: fixed;
left: 0;
top: 50%;
margin-top:-180px;
display:inline-block }
.right{
width:220px;
height: 360px;
background:url(http://img1.sycdn.imooc.com/climg//5a3383c70001f1b702240364.png) no-repeat ;
position: fixed;
right: 0;
top: 50%;
margin-top: -180px;
display:inline-block
}
</style>
</head>
<body>
<div class="page">
<div class="left"></div>
<div class="right"></div>
</div>
</body>
这里面加inline-block有什么用
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星