CSS3畫圖3-手機模型,css3畫圖3-

來源:互聯網
上載者:User

CSS3畫圖3-手機模型,css3畫圖3-
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>無標題文檔</title>
</head>
<style type="text/css">
body{
background-color:#CCC;}
#phone{
width:250px;
height:500px;
background-color:#2e2e2e;
margin:60px auto;
border:#3b3b3b solid 10px;
border-radius:50px;
box-shadow:3px 5px 5px 1px rgba(0,0,0,0.5);
position:relative;
}
#phone:before{
content:'';
width:50px;
height:6px;
background-color:#2e2e2e;
display:block;
position:absolute;
top:-16px;
left:150px;
border-radius:3px 3px 0px 0px;}
#phone:after{
content:'';
width:6px;
height:50px;
background-color:#2e2e2e;
display:block;
position:absolute;
left:-16px;
top:60px;
border-radius:3px 3px 0px 0px;}
#camera{
width:6px;
height:6px;
border:#4a4a4a solid 3px;
margin:20px auto 0px;
border-radius:50%;
box-shadow:1px 2px 2px rgba(0,0,0,0.5);}
#headphone{
width:60px;
height:5px;
border:#4a4a4a solid 4px;
margin:13px auto;
border-radius:10px;
box-shadow:1px 2px 2px rgba(0,0,0,0.5);
}
#screen{
width:220px;
height:360px;
margin:15px auto 0px;
background-color:#0a0a0a;
border:#1a1a1a solid 4px;}
#btn{
width:40px;
height:40px;
background-color:#1a1a1a;
margin:8px auto 0px;
border-radius:50px;
box-shadow:2px 2px 2px rgba(0,0,0,0.5) inset;
overflow:hidden;  /*阻止邊界的傳導*/}
#btn:before{
content:'';
width:20px;
height:20px;
border:#fff solid 2px;
display:block;
margin:9px auto;
border-radius:5px;
}
</style>
<body>
<div id="phone">
    <div id="camera"></div>
    <div id="headphone"></div>
    <div id="screen"></div>
    <div id="btn"></div>
</div>
</body>

</html>


著作權聲明:博主原創文章,轉載請說明出處。http://blog.csdn.net/dzy21

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.