8
I was testing the border-radius
and a debt has arisen... Is there any way with CSS to reverse the radius of curvature of the border-radius
?
This is the Shape format I’d like to get
But from the paperwork, it looks like border-radius
does not accept negative values
.container {
width: 300px;
height: 160px;
background-color: red;
border-radius: -20px; /* não aceita valor negativo */
}
html {
width: 100%;
height: 100%;
background-image: linear-gradient(to bottom, green, blue);
background-repeat: no-repeat;
}
<div class="container"></div>
Then there was the question, how to achieve this shape in the corners only with CSS and continue viewing the image or the background color of background
page?
OBS: I can’t use SVG or Clip-Path
It has to be with
<div>
? That there can be easily solved withsvg
.– Renan Gomes
@Renan with SVG or even Clip-Phat gets easy even, wanted with CSS only.
– hugocsl
Check out this link: https://codepen.io/sergejmueller/pen/fJEml
– Pedro Paulo
@Pedropaulo cool example, but if you put there a background: red; no body vc will see what happens... will not serve for me
– hugocsl
You have a question in the OS which should assist: https://stackoverflow.com/a/22422105/4730201
– Ricardo Pontual
@Ricardopunctual I will check! [s]
– hugocsl
My tip is to use
SVG
– Wallace Maxters
@Wallacemaxters think I already have a solution :), I will post soon, no need for SVG, although that would also serve, but wanted only with CSS
– hugocsl
It’s very complicated. The programmers who did html should have thought about it. It’s almost like we’re in the time of the html square wheel. I was needing to round open (outside and not inside) the rounded corners of a div, to make a tab similar to the tabs of the browsers.
– Alencar
@Alencar If you want the normal format just use border-Radius, and the blame is not html CSS ;)
– hugocsl