<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.box { | |
width: 300px; | |
height: 300px; | |
background-color: blue; | |
} | |
.clipped { | |
-webkit-clip-path: inset(0 50px); | |
-webkit-mask: linear-gradient(transparent, black); | |
} | |
</style> | |
</head> | |
<body> | |
<div class="clipped box"></div> | |
</body> | |
</html> |