這篇文章主要為大家展示了“css3和jquery如何實現(xiàn)動畫顯示彈出層按鈕”,內(nèi)容簡而易懂,條理清晰,希望能夠幫助大家解決疑惑,下面讓小編帶領(lǐng)大家一起研究并學習一下“css3和jquery如何實現(xiàn)動畫顯示彈出層按鈕”這篇文章吧。
成都創(chuàng)新互聯(lián)專注于東安企業(yè)網(wǎng)站建設(shè),響應(yīng)式網(wǎng)站設(shè)計,商城網(wǎng)站開發(fā)。東安網(wǎng)站建設(shè)公司,為東安等地區(qū)提供建站服務(wù)。全流程定制設(shè)計,專業(yè)設(shè)計,全程項目跟蹤,成都創(chuàng)新互聯(lián)專業(yè)和態(tài)度為您提供的服務(wù)
效果圖如下:
實現(xiàn)的代碼。
html代碼:
XML/HTML Code復制內(nèi)容到剪貼板
css3代碼:
CSS Code復制內(nèi)容到剪貼板
@import url("http://daneden.github.io/animate.css/animate.min.css"); :root { width: 100%; height: 100%; } body { width: 100%; height: 100%; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-align-items: center; -ms-flex-align: center; align-items: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; overflow: hidden; background-color: #263238; } .papersheet { position: relative; overflow: hidden; text-align: center; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-transition: all 200ms; transition: all 200ms; width: 100%; height: 100%; max-width: 50%; min-width: 50rem; max-height: 50%; min-height: 20rem; margin: 0 auto; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-align-items: center; -ms-flex-align: center; align-items: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; } .papersheet.opened { -webkit-transition: all 900ms; transition: all 900ms; box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.5); } .papersheet__trigger { z-index: 1; display: inline-block; padding: 2rem; border-radius: 50%; position: absolute; background-color: transparent; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); transform: translate(-50%, -50%); -webkit-transition: all 800ms cubic-bezier(0.19, 1, 0.22, 1); transition: all 800ms cubic-bezier(0.19, 1, 0.22, 1); cursor: pointer; } .opened .papersheet__trigger { background-color: #eceff1; top: 10%; } .papersheet__trigger:hover { box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.5); } .papersheet__trigger:active:before { background-color: #d5d5d5; } .papersheet__trigger:before { content: ""; background-color: #eceff1; display: block; position: absolute; border-radius: 50%; top: 50%; left: 50%; bottombottom: 50%; rightright: 50%; width: 6rem; height: 6rem; z-index: 0; pointer-events: none; -webkit-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); transform: translate(-50%, -50%); -webkit-transition-delay: 2s; transition-delay: 2s; -webkit-transition: all 400ms cubic-bezier(0.165, 0.84, 0.44, 1); transition: all 400ms cubic-bezier(0.165, 0.84, 0.44, 1); } .opened .papersheet__trigger:before { width: 3000px; height: 3000px; -webkit-transition: all 2.5s cubic-bezier(0.165, 0.84, 0.44, 1); transition: all 2.5s cubic-bezier(0.165, 0.84, 0.44, 1); } .papersheet__trigger-icon { fill: #37474f; vertical-align: bottombottom; -webkit-transform: rotate(45deg); -ms-transform: rotate(45deg); transform: rotate(45deg); -webkit-transition: all 800ms cubic-bezier(0.19, 1, 0.22, 1); transition: all 800ms cubic-bezier(0.19, 1, 0.22, 1); -webkit-transition-delay: 50ms; transition-delay: 50ms; width: 1.8rem; height: 1.8rem; } .opened .papersheet__trigger-icon { -webkit-transform: rotate(-360deg); -ms-transform: rotate(-360deg); transform: rotate(-360deg); } .papersheet__face-item { border-radius: 50%; margin: 0 1.5rem; z-index: 1; height: 6rem; width: 6rem; display: none; overflow: hidden; } .papersheet__face-item:nth-child(2) { -webkit-animation-delay: 50ms; animation-delay: 50ms; } .papersheet__face-item:nth-child(3) { -webkit-animation-delay: 150ms; animation-delay: 150ms; } .papersheet__face-item:nth-child(4) { -webkit-animation-delay: 250ms; animation-delay: 250ms; } .papersheet__face-item img { max-width: 100%; } .opened .papersheet__face-item { -webkit-transform: translateX(60%); -ms-transform: translateX(60%); transform: translateX(60%); display: block; }
以上是“css3和jquery如何實現(xiàn)動畫顯示彈出層按鈕”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對大家有所幫助,如果還想學習更多知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!