文章詳情頁
css3 - 如何為background-image設(shè)置動畫?
瀏覽:93日期:2023-08-07 18:14:32
問題描述
用代碼說話
section.tt-grid-wrapper{ &:hover{background-image{ -webkit-animation: pulse 2.0s infinite ease-in-out; animation: pulse 2.0s infinite ease-in-out;} } }
想讓該選區(qū)在鼠標(biāo)點擊時,只讓背景圖執(zhí)行動畫,這樣的less寫法有錯,求指點!!
問題解答
回答1:動畫說明的w3school上的css3動畫中不是有詳細(xì)說明嗎?(http://www.w3school.com.cn/css3/css3_animation.asp)背景執(zhí)行動畫?在hove里面執(zhí)行寫好的動畫就好了....我是這樣理解的 演示:http://sandbox.runjs.cn/show/eijaxo1t代碼:http://runjs.cn/code/eijaxo1t
回答2:你要的是如下效果么?http://jsfiddle.net/chenxiaochun/kgLV5/
標(biāo)簽:
CSS
相關(guān)文章:
1. javascript - 關(guān)于定時器 與 防止連續(xù)點擊 問題2. html - css 如何添加這種邊框?3. javascript - 求助這種功能有什么好點的插件?4. objective-c - ios百度地圖定位問題5. html5 - 如何解決bootstrap打開模態(tài)modal窗口引起頁面抖動?6. javascript - 求助關(guān)于js正則問題7. javascript - node.js服務(wù)端渲染解疑8. html5 - rudy編譯sass的時候有中文報錯9. 為何 localStorage、sessionStorage 屬于html5的范疇,但是為何 IE8卻支持?10. 微信開放平臺 - Android調(diào)用微信分享不顯示
排行榜

熱門標(biāo)簽