码迷,mamicode.com
首页 > 其他好文 > 详细

如何让一张背景图充满整个屏幕

时间:2019-07-05 19:35:16      阅读:748      评论:0      收藏:0      [点我收藏+]

标签:enter   z-index   min   dex   play   pac   测试   doctype   over   

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta content="width=device-width, height=device-height,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
name="viewport">
<title>测试页面</title>
</head>
<style>
html,body {
margin:0;
padding:0;
overflow: hidden;
}
/* 背景图 */
.content {
width: 100%;
height: 100%;
top:0;
z-index: -1;
position: absolute;
background: url(jrback.jpg) no-repeat;
background-size:100% 100%;
}
.d1{
width:100%;
display: flex;
text-align: center;
justify-content: space-around;
margin-top:70%;
}
.d2{
width:100%;
display: flex;
text-align: center;
justify-content: space-around;
margin-top:10%;
}
.widths{
width:50%;
}
.colors{
color:#fff;
font-size: 1rem;
}
.small_pic{
width:100%;
}
.small_pic_1{
width:50%;
}
</style>
<body>
<div class="content">
<div class=‘small_pic‘>
<div class=‘d1‘>
<div class=‘small_pic_1‘>
<div><img class=‘widths‘ src="tx1.jpg" ></div>
<span class=‘colors‘>总行(会,司)<br>报名通道</span>
</div>
<div class=‘small_pic_1‘>
<div><img class=‘widths‘ src="tx2.jpg" ></div>
<span class=‘colors‘>省(区,市)金融工会<br>报名通道</span>
</div>
</div>
<div class=‘d2‘>
<div class=‘small_pic_1‘>
<div><img class=‘widths‘ src="tx3.jpg" ></div>
<span class=‘colors‘>座次表</span>
</div>
<div class=‘small_pic_1‘>
<div><img class=‘widths‘ src="tx4.png" ></div>
<span class=‘colors‘>会议安排</span>
</div>
</div>
</div>
</body>
</html>

如何让一张背景图充满整个屏幕

标签:enter   z-index   min   dex   play   pac   测试   doctype   over   

原文地址:https://www.cnblogs.com/maibao666/p/11140088.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!