corner-right-shape
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
Thecorner-right-shape
CSS property specifies the shape of both the corners on a box's right-hand edge, within theirborder-radius
area.
For a full description of corner shape behavior and multiple examples, see thecorner-shape
shorthand property page.
In this article
Constituent properties
Thecorner-right-shape
property is a shorthand for the following physical properties:
Syntax
/* Single keyword value set for both corners */corner-right-shape: bevel;corner-right-shape: notch;/* Single superellipse() value set for both corners */corner-right-shape: superellipse(4);corner-right-shape: superellipse(-0.9);/* Top corner, bottom corner */corner-right-shape: bevel notch;corner-right-shape: notch superellipse(-0.9);/* Global values */corner-right-shape: inherit;corner-right-shape: initial;corner-right-shape: revert;corner-right-shape: revert-layer;corner-right-shape: unset;
Values
Thecorner-right-shape
property is specified using one or two<corner-shape-value>
values:
- Ifone value is used, it specifies the shape ofboth right-hand corners.
- Iftwo values are used, the first one specifies the shape of thetop-right corner, and the second one specifies the shape of thebottom-right corner.
Formal definition
Value not found in DB!Formal syntax
corner-right-shape =
<'corner-top-left-shape'>{1,2}
<corner-top-left-shape> =
<corner-shape-value>
<corner-shape-value> =
round|
scoop|
bevel|
notch|
square|
squircle|
<superellipse()>
<superellipse()> =
superellipse(<number [-∞,∞]>|
infinity|
-infinity)
Examples
You can find other related examples on thecorner-shape
reference page.
Basiccorner-right-shape
usage
HTML
The markup for this example contains a single<div>
element.
<div></div>
CSS
We give the box some basic styles, which we've hidden for brevity. We also apply abox-shadow
, aborder-radius
of20% 30% / 50% 40%
, and acorner-right-shape
ofsquare scoop
.
body { font-family: Arial, Helvetica, sans-serif; width: 240px; margin: 20px auto;}div { width: 100%; height: 180px; display: flex; justify-content: center; align-items: center; background-color: cyan; background-image: linear-gradient( to bottom, rgb(255 255 255 / 0), rgb(255 255 255 / 0.5) );}
div { box-shadow: 1px 1px 3px gray; border-radius: 20% 30% / 50% 40%; corner-right-shape: square scoop;}
Result
The rendered result looks like this:
Specifications
Specification |
---|
CSS Borders and Box Decorations Module Level 4> # propdef-corner-right-shape> |
Browser compatibility
Loading…
See also
corner-shape
shorthand propertycorner-top-shape
,corner-bottom-shape
, andcorner-left-shape
corner-block-start-shape
,corner-block-end-shape
,corner-inline-start-shape
, andcorner-inline-end-shape
border-radius
shorthand propertyborder-top-right-radius
andborder-bottom-right-radius
- CSS borders and box decorations module
- CSS backgrounds and borders module