How to apply shadow to an element in html using css?

Submitted 3 years, 2 months ago
Ticket #339
Views 226
Language/Framework CSS
Priority Medium
Status Closed

Is it possible to apply the shadow effect using css...

If possible help me out please........

Submitted on Feb 04, 21
add a comment

1 Answer

Verified

Yes it is possible by applying box shadow property to required sections or elements of html.

EXAMPLE:

<!DOCTYPE html>
<html>
<head>
<style> 
div {
  width: 300px;
  height: 100px;
  padding: 15px;
  background-color: yellow;
  box-shadow: 10px 10px;
}
</style>
</head>
<body>

<h1>The box-shadow Property</h1>

<div>This is a div element with a box-shadow</div>

</body>
</html>

Then it will be as:

we can also change the shadow colour according to our view also....

Submitted 3 years, 2 months ago
sai


Latest Blogs