box-shadow
Introduction
The box-shadow CSS property is used to add a shadow effect on the frame of the element. The values that can be set by this property include X-axis offset, Y-axis offset, shadow blur radius, shadow diffusion radius and shadow color, which are separated by multiple commas. box-shadow describes one or more shadow effects in a comma-separated list. This property allows the borders of almost all elements to be shaded. If the element is set border-radius at the same time, shadows will also have rounded corners. Order of multiple shadows in z-axis is the same rule as multiple text shadows (the first shadow is at the top).
Syntax
Values
-
A case where two, three, or four numeric values are given.
- If only two values are given, these two values will be interpreted by the browser as an offset on the x-axis
<offset-x>AndyOffset on axis<offset-y>。 - If a third value is given, this third value will be interpreted as the size of the blur radius
<blur-radius>。 - If the fourth value is given, this fourth value will be interpreted as the size of the extended radius
<spread-radius>。
- If only two values are given, these two values will be interpreted by the browser as an offset on the x-axis
-
Optional, insert (shadow inward)
inset。 -
Optional, color value
<color>。
Formal Definition
| Initial value | none |
| Applies to | All elements |
| Inherited | no |
| Animatable | no |
Formal Syntax
Difference from Web
Temporarily not support values like inherit、initial、revert、unset、inset.
Compatibility
LCD tables only load in the browser