文章详情页
css3 - 如何为background-image设置动画?
浏览:90日期: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;} } }
想让该选区在鼠标点击时,只让背景图执行动画,这样的less写法有错,求指点!!
问题解答
回答1:动画说明的w3school上的css3动画中不是有详细说明吗?(http://www.w3school.com.cn/css3/css3_animation.asp)背景执行动画?在hove里面执行写好的动画就好了....我是这样理解的 演示:http://sandbox.runjs.cn/show/eijaxo1t代码:http://runjs.cn/code/eijaxo1t
回答2:你要的是如下效果么?http://jsfiddle.net/chenxiaochun/kgLV5/
标签:
CSS
相关文章:
1. css3 - 手机网页中用css写1px的描边,为什么需要加一句overflow:hidden才能真正显示1px?2. mysql - 一个表和多个表是多对多的关系,该怎么设计3. mysql新建字段时 timestamp NOT NULL DEFAULT ’0000-00-00 00:00:00’ 报错4. python - type函数问题5. php - 第三方支付平台在很短时间内多次异步通知,订单多次确认收款6. Mysql && Redis 并发问题7. javascript - 百度echarts series数据更新问题8. css3 - css before 中文乱码?9. javascript - node服务端渲染的困惑10. css - 求推荐几款好用的移动端页面布局调试工具呢?
排行榜
