Programming Exercises

Use clip-path to create a hexagonal-shaped image.

Medium

Problem 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
00:00
<!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>
Log in or sign up to run or submit your code.Log inSign up
Expected Output
The image is displayed in a hexagonal shape.