Html代码:

<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="https://llyth.cn/img/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="css/index.css">
    <title>Document</title>
</head>
<body>
    <div class="container">
        <div class="overlay"></div>
    </div>
</body>
</html>

CSS代码:

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    position: relative;
    height: 100vh;
    background-image: url("../img/wrapper.jpg");
    background-size: cover;
    background-position: center;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

说点什么
你是我一生只会遇见一次的惊喜...
支持Markdown语法
好耶,沙发还空着ヾ(≧▽≦*)o
Loading...