<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
#div1{
background: url(img/home-bg.jpg);
text-align: center;
width: 100%;
}
#div2 {
width: 100%;
height: 100%;
background: rgba(0,0,0,.7);
padding: 90px 0;
}
</style>
</head>
<body>
<div id="div1">
<div id="div2">
<div style="height: 400px;"></div>
</div>
</div>
</body>
</html>
效果图:
css遮罩层
最新推荐文章于 2024-05-30 16:48:43 发布