Preview

Source Code
                            
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- this script got from www.devanswer.com -->
<style>
:root {
  --direction: -45deg;
}

body {
  margin: 0;
  padding: 0;
}

main {
  position: relative;
}

div {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-repeat: none;
}

.background {
  background-image: url(http://devanswer.com/codes/files/day.jpg);
}

.foreground {
  background-image: url(http://devanswer.com/codes/files/night.jpg);
  mask-image: linear-gradient(var(--direction), black 40%, rgba(0, 0, 0, 0) 60%);
  mask-position: 50% 50%;
}
</style>

</head>
<body>
<main>
<div class="background"></div>
<div class="foreground"></div>
</main>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
<div id="bcl"><a style="font-size: 8pt; text-decoration: none" target="_blank" href="http://www.devanswer.com">Developer Code</a></div>
<script>
let c = 45;

function draw() {
  document.documentElement.style.setProperty('--direction', c++ + 'deg');
  requestAnimationFrame(draw);
}

requestAnimationFrame(draw);
</script>

</body>
</html>                        



Other Codes