0
If I have a div with clip-path:polygon() can there be a child in it?
4 Réponses
0
Lego in Motion
We can childs elements.
But it will only show content inside the clip-path while those outside will be hidden
0
Check the below code for reference
0
<!DOCTYPE html>
<html>
<style>
body{
}
div{
background:#000000;
position:relative;
height:150px;
width:150px;
clip-path: polygon(74% 10%, 85% 0, 81% 100%, 73% 100%, 73% 93%);
}
span{
position:relative;
display:block;
height:90px;
width:900px;
background:blue;
}
</style>
<body>
<div>
<span style="color:#ffffff">Hello World</span>
</div>
</body>
</html>
0
For more information on css and any code snippets you can check the below Instagram page
Id: anonymous_me_0000