UPDATE So I just found out about elliptical border radius. Achieved almost the same result I was looking for, but the border thickens with the ellipsis so if anyone know's about a better approach I'm still looking. Here's my JSfiddle - Result looks like this
Code used in fiddle
border-bottom: 3px solid green;
-moz-border-radius-bottomleft: 70% 40px;
-webkit-border-bottom-left-radius: 70% 40px;
-webkit-box-shadow: 0 3px 7px 0 rgba(0,0,0,0.91) ;
box-shadow: 0 3px 7px 0 rgba(0,0,0,0.91) ;
ORIGINAL POST
I am wondering if it is possible to create a shape similar to the one below
The shape would be overlaping an image. I know I could create a recntagular DIV with a border-bottom-left-radius
then give it border-bottom: 3px solid green
and drop-shadow
, but the border radius doesn't really achieve the same "angle" as the one in the image above..
I thought I would just use an SVG, but then I can't have the drop shadow.. So if there is any way to create a shape like this with the drop shadow I am open to all suggestions. Thank you
I used inner shadow instead of border-bottom, it keeps thickens of the line pretty honestly (you can try to set first value of
box-shadow:inset
to 1 or 2px in order to move green shadow to the right). JSFiddleHTML
CSS
There's an obvious disadvantage - too many divs. But you can try to use css
::after
instead of one div.Border-Radius
You could just add the same style
border-radius
to the right, taking up the other 30% you have left over.Clip-Path
You could also look into using a
clip-path
to get the area you want. Sadly, this doesn't allow forbox-shadows
Clip Path Support
SVG
You can also achieve the shape required with an SVG.
SVG to fit use requirements