All Challenges
#69
Clip-Path Polygon (Triangle)
MediumCategory: Modern CSS
Clip the square .triangle element into a polygon triangle: 50% 0%, 0% 100%, 100% 100%.
Target HTML in preview:
<div class="triangle" style="width: 80px; height: 80px; background: #f59e0b;"></div>
Verification Criteria:
Set clip-path: polygon(50% 0%, 0% 100%, 100% 100%)
styles.css
Live EvaluationLoading...
|
Live Browser Output
Sandboxed Preview