Skilled in SEO, content writing, and digital marketing. Completed several years of working in many organizations including multinational companies.
I love to learn new things in life that keep me motivated.
The offset-x and offset-y values specify the horizontal and vertical offsets of the shadow, respectively. The blur-radius value specifies the blur radius of the shadow. The spread-radius value specifies the spread radius of the shadow. The color value specifies the color of the shadow.
Here is an example of how to use the box-shadow property to create a box shadow with a horizontal offset of 10px, a vertical offset of 10px, a blur radius of 5px, a spread radius of 10px, and a color of black:
Code snippet
div {
box-shadow: 10px 10px 5px 10px black;
}
This will create a box shadow that is 10px to the right, 10px below, 5px blurred, and 10px spread. The color of the shadow will be black.
You can also use the box-shadow property to create multiple shadows. To do this, you simply separate the shadow properties with commas. For example, the following code will create a box with two shadows:
This will create a box with a primary shadow that is 10px to the right, 10px below, 5px blurred, and 10px spread. It will also create a secondary shadow that is 5px to the right, 5px below, 1px blurred, and 5px spread. The color of the secondary shadow will be gray.
The box-shadow property is a powerful tool that can be used to create a variety of shadow effects. By experimenting with the different values, you can create shadows that are both visually appealing and functional.
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
The CSS box-shadow property is used to apply one or more shadows to an element. The syntax for the box-shadow property is:
Code snippet
The offset-x and offset-y values specify the horizontal and vertical offsets of the shadow, respectively. The blur-radius value specifies the blur radius of the shadow. The spread-radius value specifies the spread radius of the shadow. The color value specifies the color of the shadow.
Here is an example of how to use the box-shadow property to create a box shadow with a horizontal offset of 10px, a vertical offset of 10px, a blur radius of 5px, a spread radius of 10px, and a color of black:
Code snippet
This will create a box shadow that is 10px to the right, 10px below, 5px blurred, and 10px spread. The color of the shadow will be black.
You can also use the box-shadow property to create multiple shadows. To do this, you simply separate the shadow properties with commas. For example, the following code will create a box with two shadows:
Code snippet
This will create a box with a primary shadow that is 10px to the right, 10px below, 5px blurred, and 10px spread. It will also create a secondary shadow that is 5px to the right, 5px below, 1px blurred, and 5px spread. The color of the secondary shadow will be gray.
The box-shadow property is a powerful tool that can be used to create a variety of shadow effects. By experimenting with the different values, you can create shadows that are both visually appealing and functional.