Perfect ๐ let’s fully explain this version of the box-shadow:
box-shadow: 10px 10px 20px 5px rgba(0,0,0,0.3);
๐งฉ General Syntax
box-shadow: offset-x offset-y blur-radius spread-radius color;
๐ Breakdown of your values:
| Value | Part | Meaning |
|---|---|---|
| 10px | offset-x | Moves the shadow 10px to the right. |
| 10px | offset-y | Moves the shadow 10px downward. |
| 20px | blur-radius | Makes the shadow soft and blurry — larger number = more blur. |
| 5px | spread-radius | Expands the size of the shadow outward by 5px (makes it thicker/wider). |
| rgba(0,0,0,0.3) | color | A semi-transparent black shadow (opacity 0.3 = 30% visible). |
๐ง Visualization:
If you have a box like this:
<div class="card">Box</div>
And the CSS:
.card {
width: 150px;
height: 100px;
background: white;
box-shadow: 10px 10px 20px 5px rgba(0,0,0,0.3);
}
✅ The result will look like:
-
A white box
-
Shadow slightly to the bottom-right (10px each way)
-
Softly blurred (20px) and spread outward (5px)
-
With a grayish look because of the semi-transparent black
๐จ Quick tip:
If you want a softer, lifted card look, try:
box-shadow: 0 4px 10px rgba(0,0,0,0.2);
If you want a stronger, dramatic effect, try:
box-shadow: 10px 10px 30px rgba(0,0,0,0.5);
- Get link
- X
- Other Apps
- Get link
- X
- Other Apps
Comments
Post a Comment