Хочу создать переход цветом между картинкой и фоном на сайте как на 2 скрине.
Скрин моего сайта:
Скрин другого сайта:
CSS:
@charset "UTF-8";
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
background-color: #2c2c2c;
height: 2400px;
width: auto;
overflow-x: hidden;
}
#header {
position: relative;
width: auto;
height: 820px;
background-image: url(../../images/fon.png);
background-position: top center;
background-repeat: no-repeat;
background-color: #2C2C2C;
background-size: cover;
overflow: hidden;
}
#header_gradient {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 120px;
background: linear-gradient(to top, #2C2C2C 0%, transparent 100%);
mix-blend-mode: multiply;
}
#content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100%;
text-align: center;
padding: 0px;
}
#content2 {
position: absolute;
top: 600px;
left: 50%;
transform: translate(-50%, -50%);
width: 100%;
text-align: center;
padding: 20px;
margin: 262px 0;
}
#server-name {
font-size: 62px;
color: white;
text-shadow: 6px 6px 8px rgba(0, 0, 0, 0.5);
margin: 12px 0;
}
#discord-link {
color: white;
font-size: 28px;
text-shadow: 5px 5px 6px rgba(0, 0, 0, 0.5);
text-decoration: none;
}
#about-project {
font-size: 42px;
color: white;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
margin: 24px 0;
}
HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/style.css">
</head>
<body id="body">
<div id="header">
<div id="header_gradient"> </div>
</div>
<div id="content">
<h1 id="server-name">Old Memories</h1>
<a id="discord-link" href="https://discord.gg/WpWxxnrN">Наш Discord</a>
</div>
<div id="content2">
<h2 id="about-project">О проекте</h2>
</div>
<script src="script.js"></script>
</body>
</html>