In general, there is a translucent shadow effect made by :: before on the background image of the element. When you change the width of the browser window, the background image adapts, and the background remains fixed in height, but in the full window due to background-size: include background less shadow in height (the image is larger than my display). How to make the image effect adapt with the shadow effect, and in the full window it was exactly on the image? Here is another example for better understanding: https://codepen.io/Black_Fire/pen/OgBrRO
header { background: url('../img/bg-header.jpg') no-repeat center top; -webkit-background-size: contain; background-size: contain; position: relative; height: 810px; text-align: center; } header::before { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 60, 0.671); content: ''; z-index: 100; }