页面布局
时间:2021-03-17 22:51:33
收藏:0
阅读:22
基础居中布局
.wrap{
width:1000px;
margin:0 auto;
}
</style>
<div class="nav wrap"></div>
<div class="header wrap"></div>
<div class="footer wrap"></div>
无论屏幕大小多少,都能看到中间的主要内容并居中显示
背景居中
<style>
body{
margin:0;
padding:0;
}
.box{
height:400px;
min-width:1000px;
background-image:图片地址;
background-position:center -80px;
}
</style>
<div class="box">
</div>
有缺点,关键为center
原文:https://www.cnblogs.com/fuyanz/p/14551089.html
评论(0)