MOCKSTACKS
EN
Questions And Answers

More Tutorials









CSS box shadow

The box-shadow CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color


Parameters Details
inset by default, the shadow is treated as a drop shadow. the inset keyword draws the shadow inside the frame/border.
offset-x the horizontal distance
offset-y the vertical distance
blur-radius 0 by default. value cannot be negative. the bigger the value, the bigger and lighter the shadow becomes.
spread-radius 0 by default. positive values will cause the shadow to expand. negative values will cause the shadow to shrink.
color can be of various notations: a color keyword, hexadecimal, rgb(), rgba(), hsl(), hsla()


bottom-only drop shadow

.box_shadow {
 background-color: #1C90F3;
 width: 200px;
 height: 100px;
 margin: 50px;
 box-shadow: 0px 0px 8px 2px #444444;
}


inner drop shadow

#example {
 background-color: #1C90F3;
 width: 200px;
 height: 100px;
 margin: 50px;
 box-shadow: inset 0px 0px 10px 0px #444444;
}






Conclusion

In this page (written and validated by ) you learned about CSS box shadow . What's Next? If you are interested in completing CSS tutorial, your next topic will be learning about: CSS Single Element Shapes.



Incorrect info or code snippet? We take very seriously the accuracy of the information provided on our website. We also make sure to test all snippets and examples provided for each section. If you find any incorrect information, please send us an email about the issue: mockstacks@gmail.com.


Share On:


Mockstacks was launched to help beginners learn programming languages; the site is optimized with no Ads as, Ads might slow down the performance. We also don't track any personal information; we also don't collect any kind of data unless the user provided us a corrected information. Almost all examples have been tested. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. By using Mockstacks.com, you agree to have read and accepted our terms of use, cookies and privacy policy.