Currently those days had practically ended, though not entirely ended. Shadow on the website can be created by adding a few lines of CSS3 only.
CSS Shadow working principle is as follows :
box-shadow: none | <shadow> [ , <shadow> ]*We can see that the shadow separated by a comma (,) and every comma is used to provide vertical or horizontal and shadow, wide on the thickness
<shadow> = inset? && [ <length>{2,4} && <color>? ]
Example such as the following:
Syntax like this :
.example {but sometimes we need an additional prefix if you want to apply css in Firefox and Safari, because of differences in their engines. So the above script should be written like this:
box-shadow: 10px 10px 5px #888;
}
.example {Here are some examples of pieces you can use shadow :
-moz-box-shadow: 10px 10px 5px #888;
-webkit-box-shadow: 10px 10px 5px #888;
box-shadow: 10px 10px 5px #888;
}
.example_1 {HTML Syntax :
box-shadow: -5px -5px #888;
-moz-box-shadow: -5px -5px #888;
-webkit-box-shadow: -5px -5px #888;
width:300px;
background:#f4f4f4;
padding:10px;margin:10px
}
.example_2 {
box-shadow: -5px -5px 5px #888;
-moz-box-shadow: -5px -5px 5px #888;
-webkit-box-shadow: -5px -5px 5px #888;
width:300px;
background:#f4f4f4;
padding:10px;margin:10px
}
.example_3 {
box-shadow: -5px -5px 0 5px #888;
-moz-box-shadow: -5px -5px 0 5px #888;
-webkit-box-shadow: -5px -5px 0 5px#888;
width:300px;
background:#f4f4f4;
padding:10px;margin:10px
}
.example_4 {
box-shadow: -5px -5px 5px 5px #888;
-moz-box-shadow: -5px -5px 5px 5px #888;
-webkit-box-shadow: -5px -5px 5px 5px#888;
width:300px;
background:#f4f4f4;
padding:10px;margin:10px
}
.example_5 {
box-shadow: 0 0 5px #888;
-moz-box-shadow: 0 0 5px #888;
-webkit-box-shadow: 0 0 5px#888;
width:300px;
background:#f4f4f4;
padding:10px;margin:10px
}
.example_6 {
box-shadow: 0 0 5px 5px #888;
-moz-box-shadow: 0 0 5px 5px #888;
-webkit-box-shadow: 0 0 5px 5px#888;
width:300px;
background:#f4f4f4;
padding:10px;margin:10px
}
<div class="example_1" >This is an example 1 of CSS Box Shadow</div>
<br/>
<div class="example_2" >This is an example 2 of CSS Box Shadow</div>
<br/>
<div class="example_3" >This is an example 3 of CSS Box Shadow</div>
<br/>
<div class="example_4" >This is an example 4 of CSS Box Shadow</div>
<br/>
<div class="example_5" >This is an example 5 of CSS Box Shadow</div>
<br/>
<div class="example_6" >This is an example 6 of CSS Box Shadow</div>
In the shadow
If you want to create a shadow was on the element, then use the insert. For example is :
.example_7 {HTML Syntax :
box-shadow: inner 0 0 5px #888;
-moz-box-shadow: inset 0 0 5px #888;
-webkit-box-shadow: inset 0 0 5px#888;
width:300px;
background:#f4f4f4;
padding:10px;margin:10px
}
.example_8 {
box-shadow: inset 0 0 5px 5px #888;
-moz-box-shadow: inset 0 0 5px 5px #888;
-webkit-box-shadow: inset 0 0 5px 5px#888;
width:300px;
background:#f4f4f4;
padding:10px;margin:10px
}
<div class="example_7" >This is an example 7 of CSS Box Shadow</div>
<br/>
<div class="example_8" >This is an example 8 of CSS Box Shadow</div>
Multiple Shadow
We can also apply multiple effects to a single element of shadow objects by providing a comma (,).
.example_9 {HTML Syntax :
-moz-box-shadow: 0 0 10px 5px black, 40px -30px lime, 40px 30px 50px red, -40px 30px yellow, -40px -30px 50px blue;
-webkit-box-shadow: 0 0 10px 5px black, 40px -30px lime, 40px 30px 50px red, -40px 30px yellow, -40px -30px 50px blue;
box-shadow: 0 0 10px 5px black, 40px -30px lime, 40px 30px 50px red, -40px 30px yellow, -40px -30px 50px blue;
width:300px;
background:#f4f4f4;
padding:10px;margin:10px
}
<br/><br/> <div class="example_9" >This is an example 9 of CSS Box Shadow</div>