您好,登錄后才能下訂單哦!
本篇文章為大家展示了如何實現(xiàn)css3和H5實現(xiàn)波紋特效的功能,代碼簡明扼要并且容易理解,絕對能使你眼前一亮,通過這篇文章的詳細介紹希望你能有所收獲。
css3實現(xiàn)動態(tài)波紋特效,由于css3里面有過渡和動畫效果,現(xiàn)在利用css3實現(xiàn)動態(tài)波浪效果就很簡單了,直接使用transform來實現(xiàn)就ok, 使得translateX 產(chǎn)生偏移就可以不斷實現(xiàn)循環(huán)動態(tài)效果,這樣就比傳統(tǒng)的flash來實現(xiàn)更為簡單。而且對頁面也比較友好的。
本文主要和大家介紹css3實現(xiàn)波紋特效、H5實現(xiàn)動態(tài)波浪效果,非常不錯,具有參考借鑒價值,需要的朋友可以參考下,希望能幫助到大家。
比如實現(xiàn)以下的背景波紋特效:
html5結(jié)構(gòu):
<p class="wrap__uc-hdinfo"> <p class="inner flexbox"> <p class="uimg"> <span class="img"><img src="images/uimg/uimg-def.jpg" /></span> </p> <a class="info flex1" href="#"> <label class="name">露娜</label> <label class="type mt-10">普通會員</label> <label class="tel ff-ar">18621535487</label> </a> <i class="arr iconfont icon-youjiantou c-fff fs-24"></i> <a class="lktel" href="tel:15888886666"><i class="iconfont icon-dianhua1"></i></a> </p> <!--css3實現(xiàn)波紋--> <p class="wrap__uc-waves"> <i class="wave w1"></i> <i class="wave w2"></i> </p> </p>
css3代碼:
/*css3波紋*/ .wrap__uc-waves{overflow:hidden;height:1rem;width:100%;position:absolute;bottom:0;} .wrap__uc-waves .wave{width:15rem; transform-origin:center bottom; position:absolute;left:0;bottom:0;} .wrap__uc-waves .w1{background:url(../images/icon__uc-hd-waves01.png) no-repeat;background-size:cover; height:.5rem; animation:anim_wave 5s linear infinite;} .wrap__uc-waves .w2{background:url(../images/icon__uc-hd-waves02.png) no-repeat;background-size:cover; height:.7rem; animation:anim_wave 6s linear infinite;} @keyframes anim_wave { 0% { transform: translateX(0) translateZ(0) scaleY(1) } 50% { transform: translateX(-25%) translateZ(0) scaleY(0.55) } 100% { transform: translateX(-50%) translateZ(0) scaleY(1) } }
上述內(nèi)容就是如何實現(xiàn)css3和H5實現(xiàn)波紋特效的功能,你們學到知識或技能了嗎?如果還想學到更多技能或者豐富自己的知識儲備,歡迎關(guān)注億速云行業(yè)資訊頻道。
免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。