Hello friends, I would like you to help me, I want to style a div with a cut edge that contains a text, type google, I am trying but I can't. I leave the link for you to see. it's a google online survey: http://goo.gl/forms/7cQEZDxNAo
Hello friends, I would like you to help me, I want to style a div with a cut edge that contains a text, type google, I am trying but I can't. I leave the link for you to see. it's a google online survey: http://goo.gl/forms/7cQEZDxNAo
As Carlos says in his comment , if you look at the code you can see that they achieve it using SVG with a polygon (copied from the link you share):
The image adapts to the height of the container and looks good then.
If you want to do it exclusively with CSS and without SVG (as the question is tagged), you could do it using borders (although this solution is a bit hacky and won't always look good because it doesn't allow much configuration):
If you use the browser's developer tools, which you access with F12, you can inspect the html.
This way you could analyze the use of the tags
svg
andpolygon
Maybe I'm too late to answer, maybe you already know how to do it, but well, I think it can be useful to someone. It goes to those who don't know and are looking for how to do it easily.
To make a cut div like that you just need something like this:
A normal rectangular div of all life with the text and even the divCut aside.