How to make a background image to fill the screen

<!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> Test Page </ title>
</head>
<style>
html,body {
margin:0;
padding:0;
overflow: hidden;
}
/ * Background * /
.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" alt=""></div>
<Span class = 'colors'> Head (will, Division) Registration <br> channel </ span>
</div>
<div class='small_pic_1'>
<div><img class='widths' src="tx2.jpg" alt=""></div>
<Span class = 'colors'> provinces (autonomous regions and municipalities) financial union <br> registration channel </ span>
</div>
</div>
<div class='d2'>
<div class='small_pic_1'>
<div><img class='widths' src="tx3.jpg" alt=""></div>
<Span class = 'colors'> seating chart </ span>
</div>
<div class='small_pic_1'>
<div><img class='widths' src="tx4.png" alt=""></div>
<Span class = 'colors'> meeting arrangements </ span>
</div>
</div>
</div>
</body>
</html>

Guess you like

Origin www.cnblogs.com/maibao666/p/11140088.html