<!DOCTYPE html>
<html>
<head>
<style>
h1 {
text-shadow: 2px 2px 5px gray; /* X, Y, blur, color */
}
.box {
width: 200px;
height: 100px;
background: lightgreen;
box-shadow: 5px 5px 15px rgba(0,0,0,0.3);
text-align: center;
line-height: 100px;
}
</style>
</head>
<body>
<h1>Text Shadow Example</h1>
<div class="box">Box Shadow</div>
</body>
</html>
Explanation:
text-shadow
: adds a glowing or shadow effect to text.box-shadow
: adds shadow around elements.
Leave a Reply