Just like how we can apply a shadow on text, we can also apply a shadow on a box.
To add a shadow around a box, we can use the box-shadow
property.
There are six values that we must pass it, in order:
The following code will produce the Sample Box below:
#box {
box-shadow: 2px 4px 7px 2px blue;
margin: 10px;
padding: 10px;
}
The Modern Web will guide you through the most important tools of device-agnostic web development, including HTML5, CSS3, and JavaScript. The plain-english explanations and practical examples emphasize the techniques, principles, and practices that you'll need to easily transcend individual browser quirks and stay relevant as these technologies are updated.
$ Check priceEver feel achy from sitting crunched up on your computer table? Try lying down with these optical glasses that allow you to work on your laptop while lying flat on your back. This is the perfect solution with those with limited mobility or those who wish to prevent neck cramps and back strains.
$ Check priceAd