Use clip-path to create a hexagonal-shaped image.
MediumProblem Statement
Use clip-path to create a hexagonal-shaped image.
Sample Output
The image is displayed in a hexagonal shape.
Limits
Time: 2s · Memory: 256 MB
Code Editor
Log in to submit00:00
Try your code in this preview. Submit marks it done.
<!DOCTYPE html>
<html>
<head>
<style>
/* Add CSS here to clip the image into a hexagon */
</style>
</head>
<body>
<img src="example.jpg" alt="Hexagon Image" class="hexagon" />
</body>
</html>
Document
To view the HTML changes, please type the code within the editor