PHP从入门到精通,039第三章HTML5+CSS3——CSS3之box-shadow属性(DAY7第6课)

四、box-shadow属性

box-shadow——阴影

box-shadow:3px 3px 3px 3px #f00 inset;
box-shadow的各个属性值的说明:水平阴影、垂直阴影、羽化值、阴影大小、阴影颜色、阴影类别[内阴影][外阴影]

作业

<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>iPhone</title>
  <style type="text/css">
      .iphone {
       width:250px;
       height:450px;
       background:#2e2e2e;
       margin:60px auto;
       border:10px solid #3b3b3b;
       border-radius:20px;
       position:relative;
      }
      .iphone:before {
       content:"";
       width:50px;
       height:10px;
       background:#2e2e2e; 
       display:block;
       position:absolute;
       top:-18px;
       right:25px;
       border-radius:3px;
      }
      .iphone:after {
       content:"";
       width:10px;
       height:50px;
       background:#2e2e2e; 
       display:block;
       position:absolute;
       top:40px;
       left:-18px;
       border-radius:3px;
      }
      .cam {
       width:10px;
       height:10px;
       border-radius:50%;
       border:3px solid #4a4a4a;
       position:absolute;
       top:10px;
       left:48%;
      }
      .headphone {
       width:50px;
       height:4px;
       border-radius:50px;
       border:3px solid #4a4a4a;
       position:absolute;
       top:30px;
       left:40%;
      }
      .screen {
       width:240px;
       height:330px;
       background:#0a0a0a;
       position:absolute;
       top:60px;
       left:5px;
      }
      .home {
       width:50px;
       height:50px;
       border-radius:50%;
       background:#0a0a0a;
       position:absolute;
       bottom:5px;
       left:40%;
      }
      .aj {
       width:25px;
       height:25px;
       border-radius:5px;
       border:3px solid white;
       position:absolute;
       bottom:10px;
       left:18%;
      }
  </style>
 </head>
 <body>
      <div class="iphone">
          <div class="cam"></div>
          <div class="headphone"></div>
          <div class="screen"></div>
          <div class="home">
              <div class="aj"></div>
          </div>
      </div>
 </body>
</html>
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容