Box shadow in css
The box-shadow CSS property describes one or more shadow effects as a comma-separated list. It allows casting a drop shadow from the frame of almost any element. If a border-radius is specified on the element with a box shadow, the box shadow takes on the same rounded corners. The z-ordering of multiple box shadows is the same as multiple text shadows (the first specified shadow is on top).
Used in casting shadows off block-level elements (like divs).
CSS
-------------------------------------------------------------------------------------
.shadow {
-moz-box-shadow: 3px 3px 5px 6px #ccc;
-webkit-box-shadow: 3px 3px 5px 6px #ccc;
box-shadow: 3px 3px 5px 6px #ccc;
}
-------------------------------------------------------------------------------------
- The horizontal offset.
- The vertical offset.
- The blur radius (optional).
- The spread radius (optional).
- Color ex.#cccccc
Inner Shadow
CSS
-------------------------------------------------------------------------------------
.shadow {
-moz-box-shadow: inset 0 0 10px #000000;
-webkit-box-shadow: inset 0 0 10px #000000;
box-shadow: inset 0 0 10px #000000;
}
-------------------------------------------------------------------------------------
Internet Explorer Box Shadow
for this you need extra elements...
HTML
-------------------------------------------------------------------------------------
<div class="shadow1">
<div class="content">
Box-shadowed element
</div>
</div>
-------------------------------------------------------------------------------------
CSS
-------------------------------------------------------------------------------------
.shadow1 {
margin: 40px;
background-color: rgb(68,68,68); /* Needed for IEs */
-moz-box-shadow: 5px 5px 5px rgba(68,68,68,0.6);
-webkit-box-shadow: 5px 5px 5px rgba(68,68,68,0.6);
box-shadow: 5px 5px 5px rgba(68,68,68,0.6);
filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius=3,MakeShadow=true,ShadowOpacity=0.30);
-ms-filter: "progid:DXImageTransform.Microsoft.Blur(PixelRadius=3,MakeShadow=true,ShadowOpacity=0.30)";
zoom: 1;
}
.shadow1 .content {
position: relative; /* This protects the inner element from being blurred */
padding: 100px;
background-color: #DDD;
}
-------------------------------------------------------------------------------------
Single-Side Only
Using a negative spread radius, you can get squeeze in a box shadow and only push it off one edge of a box.
CSS
-------------------------------------------------------------------------------------
.single-edge-shadow {
-webkit-box-shadow: 0 8px 6px -6px black;
-moz-box-shadow: 0 8px 6px -6px black;
box-shadow: 0 8px 6px -6px black;
}
-------------------------------------------------------------------------------------
Try and enjoy..
Subscribe to:
Post Comments
(
Atom
)
Labels
CSS
(
5
)
CSS3
(
3
)
Designer
(
1
)
Designs
(
7
)
Fullscreen
(
1
)
Gradients
(
1
)
HTML5
(
2
)
Jquery
(
1
)
Layout
(
2
)
Logo
(
2
)
PSD
(
16
)
Photoshop
(
18
)
Slider
(
1
)
Wallpaper
(
6
)
abstracts
(
12
)
adobe
(
7
)
attractive
(
2
)
backgrounds
(
9
)
banners
(
3
)
beauty
(
1
)
bottle
(
1
)
business
(
19
)
collection
(
8
)
coming soon psd
(
1
)
corporate
(
2
)
creative
(
19
)
design
(
19
)
download
(
22
)
downloads
(
54
)
free
(
13
)
free download
(
7
)
free fonts
(
4
)
graphics
(
4
)
grunge
(
1
)
holiday
(
1
)
hot
(
1
)
html template
(
2
)
icons
(
6
)
in psd
(
19
)
interface
(
2
)
label
(
2
)
loading bar design
(
1
)
menu
(
2
)
mockup designs
(
2
)
music banner design
(
1
)
nature banner design
(
1
)
navinations
(
1
)
print design
(
2
)
psd templates
(
6
)
radio buttons
(
1
)
responsive
(
3
)
restaurant template design
(
2
)
ribbons
(
2
)
sale
(
1
)
sale vector designs
(
1
)
salon
(
1
)
shape
(
1
)
skyline
(
1
)
submit buttons design
(
1
)
summer
(
2
)
template design
(
2
)
templates
(
3
)
twitter
(
1
)
vector
(
11
)
vector design
(
3
)
vectors
(
3
)
we template
(
3
)
web button
(
3
)
web design
(
5
)
website templates
(
2
)

No comments :
Post a Comment