码迷,mamicode.com
首页 > Web开发 > 详细

CSS3制作的3D阴影效果

时间:2015-03-12 18:54:40      阅读:161      评论:0      收藏:0      [点我收藏+]

标签:

<!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>CSS3制作的3D阴影效果</title>
    <style>
    /* -----------  Reset ----------- */
    * {
    margin: 0;
    padding: 0;
    }
    body {
    background: #000000;
    }
    a {
    color: #FF6600;
    font: 100 14px/30px Helvetica, Verdana, sans-serif;
    }
    h1.title_name {
    font-family: "Trebuchet MS","Myriad Pro",Arial,sans-serif;
    font-weight: normal;
    font-size: 4em;
    color: #FAFAFA;
    margin: 0;
    padding: 20px 0 0 0;
    text-align: center;
    line-height: 1em;
    }
    h1.title_name span {
    font-family: normal Georgia,Times New Roman,Times,serif;
    color: #FF6600;
    font-size: 0.9em;
    }
    h1.title_name small {
    display: block;
    font-family: normal Verdana,Arial,Helvetica,sans-serif;
    font-size: 0.3em;
    font-weight: bold;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: #AAA;
    text-shadow: none;
    }
    #container { width: 750px; background: #FAFAFA; margin: 100px auto; padding-bottom: 50px; border-radius: 5px;}
    footer { background: #FFF; padding: 10px; bottom: 50px; margin-top: 10px; color: #333;}
    .demo { widows: 750px;
    margin: 0 auto;
    }
    h2,h3 {    padding: 10px 0 20px;
    font: 50px/1 "Trebuchet MS","Myriad Pro",Arial,sans-serif;
    text-align: center;
    text-shadow:
    0 1px 1px #bbb,
    0 2px 0 #999,
    0 3px 0 #888,
    0 4px 0 #777,
    0 5px 0 #666,
    0 6px 0 #555,
    0 7px 0 #444,
    0 8px 0 #333,
    0 9px 7px #302314;
    }
    .box-shadow {
    width: 200px;
    height: 100px;
    margin-top: 50px;
    box-shadow: 0 0 10px 5px black, 20px -20px 10px red, 20px 20px 10px yellow, -20px 20px 10px blue, -20px -20px 10px green;
    }
    </style>
    <!--[if IE]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    </head>
    <body>
    <header>
    <h1 class="title_name">CSS3 Shadow Research<small>by Sunflowa Media影院座椅</small></h1>
    </header>
    <div id="container">
    <section>
    <div class="demo">
    <h2>gopro摄像机</h2>
    <h3>任E行行车记录仪官网</h3>
    </div>
    <div class="demo box-shadow">
    </div>
    </section>
    </div>
    </body>
    </html>
    <br><font color=skyblue>目前IE8及以前版本不兼容CSS3,请使用火狐或CHROME浏览器运行本效果。<br><hr></font>
    

 

CSS3制作的3D阴影效果

标签:

原文地址:http://www.cnblogs.com/youtianxia/p/4333115.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!