Various beautiful shadow effects implemented by css3 shadow, css3shadow

Source: Internet
Author: User

Various beautiful shadow effects implemented by css3 shadow, css3shadow

<! DOCTYPE html>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<Title> various shadow effects implemented by pure CSS3 </title>
<Style>
Body {padding: 20px 0 0; font: 14px/1.5 Arial, sans-serif; text-align: center; color: #333; background: # FAF0D9 ;}
A {font-weight: bold; color: #0000aa8 ;}
A: hover, a: focus, a: active {text-decoration: none ;}
. Container {position: relative; z-index: 1; width: 600px; padding: 20px; margin: 0 auto; background: # FAF0D9 ;}
. Container: after {content: ""; display: block; clear: both; visibility: hidden; height: 0; font-size: 0 ;}
/* Shared styles */. drop-shadow {position: relative; float: left; width: 40%; padding: 1em; margin: 2em 10px 4em; background: # fff;-webkit-box-shadow: 0 1px 4px rgba (0, 0, 0, 0.3), 0 0 60px rgba (0, 0, 0, 0.1) inset;-moz-box-shadow: 0 1px 4px rgba (0, 0, 0, 0.3), 0 0 40px rgba (0, 0, 0, 0.1) inset; box-shadow: 0 1px 4px rgba (0, 0, 0, 0.3), 0 0 40px rgba (0, 0, 0, 0.1) inset ;}
. Drop-shadow: before,. drop-shadow: after {content: ""; position: absolute; z-index:-2 ;}
. Drop-shadow p {font-size: 16px; font-weight: bold ;}
/* Lifted corners */. lifted {-moz-border-radius: 4px; border-radius: 4px ;}
. Lifted: before ,. lifted: after {bottom: 15px; left: 10px; width: 50%; height: 20%; max-width: 300px;-webkit-box-shadow: 0 15px 10px rgba (0, 0, 0, 0.7);-moz-box-shadow: 0 15px 10px rgba (0, 0, 0, 0.7); box-shadow: 0 15px 10px rgba (0, 0, 0, 0.7);-webkit-transform: rotate (-3deg);-moz-transform: rotate (-3deg);-o-transform: rotate (-3deg ); transform: rotate (-3deg );}
. Lifted: after {right: 10px; left: auto;-webkit-transform: rotate (3deg);-moz-transform: rotate (3deg);-o-transform: rotate (3deg); transform: rotate (3deg );}
/* Curled corners */. curled {border: 1px solid # efefef;-moz-border-radius: 0 0 120px 120px/0 0 6px 6px; border-radius: 0 0 120px 120px/0 0 6px 6px ;}
. Curled: before ,. curled: after {bottom: 12px; left: 10px; height: 55%; max-width: 200px;-webkit-box-shadow: 0 8px 16px rgba (0, 0, 0, 0, 0.4);-moz-box-shadow: 0 8px 16px rgba (0, 0, 0, 0.4); box-shadow: 0 8px 16px rgba (0, 0, 0, 0, (0.4);-webkit-transform: skew (-8deg) rotate (-4deg);-moz-transform: skew (-8deg) rotate (-4deg);-o-transform: skew (-8deg) rotate (-4deg); transform: skew (-8deg) rotate (-4deg );}
. Curled: after {right: 10px; left: auto;-webkit-transform: skew (8deg) rotate (4deg);-moz-transform: skew (8deg) rotate (4deg ); -o-transform: skew (8deg) rotate (4deg); transform: skew (8deg) rotate (4deg );}
/* Perspective */. perspective: before {left: 80px; bottom: 8px; width: 50%; height: 35%; max-width: 200px;-webkit-box-shadow: -80px 5px 10px rgba (0, 0, 0, 0.4);-moz-box-shadow:-80px 5px 8px rgba (0, 0, 0, 0.4 ); box-shadow:-80px 5px 8px rgba (0, 0, 0, 0.4);-webkit-transform: skew (50deg);-moz-transform: skew (50deg ); -o-transform: skew (50deg); transform: skew (50deg);-webkit-transform-origin: 0 100%;-moz-transform-origin: 0 100%; -o-transform-origin: 0 100%; transform-origin: 0 100% ;}
. Perspective: after {display: none ;}
/* Raised shadow-no pseudo-elements needed */. raised {-webkit-box-shadow: 0 15px 10px-10px rgba (0, 0, 0, 0.5), 0 1px 4px rgba (0, 0, 0, 0, 0.3 ), 0 0 60px rgba (0, 0, 0, 0.1) inset;-moz-box-shadow: 0 15px 10px-10px rgba (0, 0, 0, 0.5 ), 0 1px 4px rgba (0, 0, 0, 0.3), 0 0 40px rgba (0, 0, 0, 0.1) inset; box-shadow: 0 15px 10px-10px rgba (0, 0, 0, 0.5), 0 1px 4px rgba (0, 0, 0, 0.3), 0 0 40px rgba (0, 0, 0, 0, 0.1) inset ;}
/* Curved shadows */. curved: before {top: 10px; bottom: 10px; left: 0; right: 50%;-webkit-box-shadow: 0 0 15px rgba (0.6, 0, 0 ); -moz-box-shadow: 0 0 15px rgba (0.6, 0, 0.6); box-shadow: 0 0 15px rgba (, 0 ); -moz-border-radius: 10px/100px; border-radius: 10px/100px ;}
Curved-vt-2: before {right: 0 ;}
. Curved-hz-1: before {top: 50%; bottom: 0; left: 10px; right: 10px;-moz-border-radius: 100px/10px; border-radius: 100px/10px ;}
. Curved-hz-2: before {top: 0; bottom: 0; left: 10px; right: 10px;-moz-border-radius: 100px/10px; border-radius: 100px/10px ;}
/* Rotated box */. rotated {-webkit-box-shadow: none;-moz-box-shadow: none;-webkit-transform: rotate (-3deg ); -moz-transform: rotate (-3deg);-o-transform: rotate (-3deg); transform: rotate (-3deg );}
. Rotated: first-child: before {content: ""; position: absolute; z-index:-1; top: 0; bottom: 0; left: 0; right: 0; background: # fff;-webkit-box-shadow: 0 1px 4px rgba (0, 0, 0, 0.3), 0 0 60px rgba (0, 0, 0, 0.1) inset;-moz-box-shadow: 0 1px 4px rgba (0, 0, 0, 0.3), 0 0 40px rgba (0, 0, 0, 0.1) inset; box-shadow: 0 1px 4px rgba (0, 0, 0, 0.3), 0 0 40px rgba (0, 0, 0, 0.1) inset ;}
</Style>
<Script>
Var _ gaq = _ gaq | []; _ gaq. push (['_ setaccount', 'ua-7489188-1']); _ gaq. push (['_ trackpageview']);
(Function (){
Var ga = document. createElement ('script'); ga. async = true; ga. src = 'HTTP: // www.google-analytics.com/ga.js ';
Var s = document. getElementsByTagName ('script') [0];
S. parentNode. insertBefore (ga, s );
})();
</Script>
</Head>
<Body>
<Div> http://www.999jiujiu.com/</div>
<Div class = "container">
<H1> <a href = ""> CSS drop-shadows without images </a> <Div class = "drop-shadow lifted">
<P> Lifted corners </p>
</Div>
<Div class = "drop-shadow curled">
<P> Curled corners </p>
</Div>
<Div class = "drop-shadow perspective">
<P> Perspective </p>
</Div>
<Div class = "drop-shadow raised">
<P> Raised box </p>
</Div>
<Div class = "drop-shadow curved curved-vt-1">
<P> Single vertical curve </p>
</Div>
<Div class = "drop-shadow curved curved-vt-2">
<P> Vertical curves </p>
</Div>
<Div class = "drop-shadow curved curved-hz-1">
<P> Single hozitonal curve </p>
</Div>
<Div class = "drop-shadow curved curved-hz-2">
<P> Horizontal curves </p>
</Div>
<Div class = "drop-shadow lifted rotated">
<P> Rotated box </p>
</Div>
</Div>
</Body>
</Html>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.