Which of the following property sets the shadow for a box element?a)sh...
The correct answer is option B) set-shadow.
Explanation:
In CSS, the property that sets the shadow for a box element is called "box-shadow". It allows you to add shadow effects to elements such as divs, images, or any other HTML element.
To use the "box-shadow" property, you can follow the syntax:
```css
box-shadow: h-offset v-offset blur spread color;
```
Let's break down the different components of this property:
- h-offset: It specifies the horizontal position of the shadow. A positive value moves the shadow to the right, and a negative value moves it to the left.
- v-offset: It specifies the vertical position of the shadow. A positive value moves the shadow downwards, and a negative value moves it upwards.
- blur: It specifies the blur radius of the shadow. A larger value creates a more blurred shadow, while a smaller value creates a sharper shadow.
- spread: It specifies the size of the shadow. A positive value increases the size, and a negative value decreases it.
- color: It specifies the color of the shadow.
Here's an example of how to use the "box-shadow" property:
```css
.box {
width: 200px;
height: 200px;
background-color: #f1f1f1;
box-shadow: 10px 10px 5px #888888;
}
```
In this example, the box element with the class "box" will have a shadow with a horizontal offset of 10px, a vertical offset of 10px, a blur radius of 5px, and a color of #888888.
Note: The other options mentioned in the question, such as "shadow", "set-shadow", and "canvas-shadow" are not valid CSS properties. The correct property to set a shadow for a box element is "box-shadow".
Which of the following property sets the shadow for a box element?a)sh...
Syntax:box-shadow: none | inherit
To make sure you are not studying endlessly, EduRev has designed Class 5 study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Class 5.