CSS3中怎么實(shí)現(xiàn)開(kāi)門效果

本篇文章給大家分享的是有關(guān)CSS3中怎么實(shí)現(xiàn)開(kāi)門效果,小編覺(jué)得挺實(shí)用的,因此分享給大家學(xué)習(xí),希望大家閱讀完這篇文章后可以有所收獲,話不多說(shuō),跟著小編一起來(lái)看看吧。

創(chuàng)新互聯(lián)主要從事成都做網(wǎng)站、成都網(wǎng)站建設(shè)、網(wǎng)頁(yè)設(shè)計(jì)、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務(wù)。立足成都服務(wù)欒川,十余年網(wǎng)站建設(shè)經(jīng)驗(yàn),價(jià)格優(yōu)惠、服務(wù)專業(yè),歡迎來(lái)電咨詢建站服務(wù):13518219792

代碼如下:

<!DOCTYPE html>
<html>
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>css3開(kāi)門</title>
  <style type="text/css">
   .door{ position:relative; width:400px; height:300px; overflow:hidden; border:2px solid #000; background:#000;}
   .door:before,.door:after{ content:''; position:absolute; left:0; width:0; height:0; overflow:hidden; border-color:#000 transparent transparent transparent; border-style:solid; border-width:0 200px; z-index:2; transition:all .8s ease;}
   .door:before{ top:0;}
   .door:after{ bottom:0; border-color:transparent transparent #000 transparent;}
   .door:hover:before,.door:hover:after{ border-width:40px 200px;}
   .door-left, .door-right{ position:relative; float:left; width:50%; height:100%; background: #64DE27; box-sizing:border-box; transition:all .5s ease;}
   .door-left{ border-right:2px solid #000; -webkit-transform-origin:0 0;}
   .door-left:before,.door-right:before{ content:''; position:absolute; width:10px; height:10px; top:50%; margin-top:-5px; border-radius:50%; background:#000;}
   .door-left:before{ right:5px;}
   .door-right:before{ left:5px;}
   .door-right{ border-left:2px solid #000; -webkit-transform-origin:100% 0;}
   .door:hover .door-left{ -webkit-transform:rotateY(-90deg);   transition:transform 2s Linear}
   .door:hover .door-right{ -webkit-transform:rotateY(90deg);   transition:transform 2s Linear}
  </style>
 
 </head>
 <body>
 <div class="door">
     <div class="door-left">1</div>
     <div class="door-right">1</div>
 </div></p>
<p><script type="text/javascript">
</script>
 </body>
</html>

以上就是CSS3中怎么實(shí)現(xiàn)開(kāi)門效果,小編相信有部分知識(shí)點(diǎn)可能是我們?nèi)粘9ぷ鲿?huì)見(jiàn)到或用到的。希望你能通過(guò)這篇文章學(xué)到更多知識(shí)。更多詳情敬請(qǐng)關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。

本文標(biāo)題:CSS3中怎么實(shí)現(xiàn)開(kāi)門效果
網(wǎng)站路徑:http://muchs.cn/article26/gecgjg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供App開(kāi)發(fā)網(wǎng)站收錄、建站公司服務(wù)器托管、做網(wǎng)站虛擬主機(jī)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

成都定制網(wǎng)站建設(shè)