I'm currently trying to achieve the following effect with CSS, unfortunately my efforts have failed trying to modify code to get this even mildly right.
Any help would be greatly appreciated.
The border-top-right-radius property defines the radius of the top-right corner. Tip: This property allow you to add rounded borders to elements!
You can give any element “rounded corners” by applying a border-radius through CSS. You'll only notice if there is a color change involved. For instance, if the element has a background-color or border that is different than the element it's above.
The border-top-left-radius CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner.
You can use border-radius
only on the two left corners and combine two values each, as in this example (you have to try around a bit to find a good combination):
.outer {
width: 500px;
background-color: #ddd;
overflow: auto;
}
.outer img {
float: right;
border-top-left-radius: 30px 50%;
border-bottom-left-radius: 30px 50%;
}
<div class="outer">
<img src="http://placehold.it/200x400/fb3">
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With