How to add box shadow to a box in css

王林
Release: 2020-11-13 09:14:27
Original
10349 people have browsed it

How to add a box shadow to a box in css: You can use the box-shadow attribute to add a box shadow, such as [box-shadow: 10px 10px 5px #888888;]. The box-shadow property can set one or more drop-down shadow boxes.

How to add box shadow to a box in css

#The box-shadow property can set one or more drop-down shadow boxes.

(Learning video sharing:css video tutorial)

Grammar:

box-shadow: h-shadow v-shadow blur spread color inset;
Copy after login

Tips:

boxShadow attribute puts one or more A drop shadow is added to the box. This property is a comma-separated list of shades, each shade specified by 2-4 length values, an optional color value, and an optional inset keyword. The value for omitted length is 0.

Attribute value:

How to add box shadow to a box in css

Example:

Add shadow to div element:

div { box-shadow: 10px 10px 5px #888888; }
Copy after login

Related recommendations :CSS tutorial

The above is the detailed content of How to add box shadow to a box in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!