Log in

View Full Version : Shadow



Dellahyam
12-05-2013, 07:24 PM
I know I wrote this down along time ago but I cant find it.

How do I add a shadow effect to my CSS layout?

Thank you ahead of time!

coothead
12-05-2013, 10:08 PM
Hi there Dellahyam,

here is an example of text and box shadow...


<!DOCTYPE html>
<html lang="en">
<head>

<meta charset="utf-8">

<title>text and box shadow</title>

<style>
body {
background-color:rgba(241,241,24,1.0):
}
h1 {
width:50%;
padding:1em 0;
margin:auto;
border:1px solid rgba(0,0,0,0.6);
background-color:rgba(255,255,255,1.0);
box-shadow:inset 0 0 20px rgba(0,0,0,0.6),
10px 10px 10px rgba(0,0,0,0.6);
color:rgba(204,204,204,1.0);
text-align:center;
text-shadow:1px 1px 1px rgba(0,0,0,1.0),
1px 1px 2px rgba(0,0,0,1.0),
0 0 6px rgba(0,0,255,0.8);
}
</style>

</head>
<body>

<h1>Text shadow and box shadow</h1>

</body>
</html>


coothead