<style type="text/css">
html {
height: 100%; //高度
}
body {
background-image: url(images/background.jpg); //背景图像
background-repeat: no-repeat; //背景图像不重复。
background-position: center top; //设置背景图像的起始位置,居中
与靠上
background-size: cover;
//背景图像的尺寸,把背景图像扩展至整个画面,使背景图像覆盖整个区域
background-color:#35a0ca; //背景颜色
}
.a{
margin-top: 2%; //上边界
}
</style>
评论0