With pseudo and transform you can do this and it has good browser support (from IE9)
body { background: url(https://picsum.photos/400/300) center / cover; } div { position: relative; width: 200px; height: 200px; overflow: hidden; } div::before { content: ''; position: absolute; left: calc(50% + 25px); top: calc(50% + 25px); width: 141.5%; height: 141.5%; transform: translate(-50%,-50%) rotate(45deg); background: #eee; opacity: 0.8; }
<div></div>
As indicated, if you need to scale it with a different aspect ratio, use this
body { background: url(https://picsum.photos/400/300) center / cover; } div { position: relative; width: 80vw; height: 80vh; overflow: hidden; } div::before { content: ''; position: absolute; left: 0; top: 0; width: 1000%; height: 5000%; transform: rotate(45deg) translate(25px,-50%); transform-origin: left top; background: #eee; opacity: 0.8; }
<div></div>
source share