i want to create a mask over a picture using svg file.
it will use for header section, a header with 50% opacity mask over it.
but i have problem in responsive. in high resolutions, behind mask will empty and solid color, and in low resolutions, picture will overflow from mask.
please look at my try and help me.
body{
background:#eee;
padding:0;
margin:0;
}
#header{
position:relative;
background:url(https://images.unsplash.com/photo-1531826267553-c4979aefab12?ixlib=rb-1.2.1&auto=format&fit=crop&w=1567&q=80);
background-attachment: scroll;
background-repeat: none;
background-size:100% auto;
background-position: 0 50%;
padding-top:10px;
padding-bottom:200px;
}
#header:before {
background: rgba(36, 55, 84, 0.5);
content: "";
width: 100%;
height: calc(100% - 100px);
position: absolute;
right: 0;
top: 0;
}
#header:after {
background: url(https://svgshare.com/i/LSs.svg);
content: "";
width: 100%;
height: 200px;
position: absolute;
background-attachment: scroll;
background-size: 100%;
background-repeat: no-repeat;
right: 0;
top:calc(100% - 100px);
}
#header .header-content{
z-index: 1;
margin-top: 130px;
position: relative;
margin-bottom: -50px;
}
#header .header-content h1 {
color: #fff;
text-align:center;
}
<html>
<head></head>
<body>
<div id="header">
<div class="header-content">
<h1>Welcome to our website</h1>
</div>
</div>
</body>
</html>
thanks