帮助中心
获取牛币
联系我们
关于我们
版权声明
素材牛首页
微博登录
QQ登录
微信扫码登录
注册
登录
新浪微博
QQ登陆
微信登录
热门搜索:
小程序
支付
Java
后台模板
上传
商城模板
jQuery
手机
Thinkphp
微信
Vue.js
首 页
网页特效
整站源码
PHP实例
网站模版
工具箱
常用代码
论坛
游戏源码
资源分享
当前位置:
首页
»
精选常用代码
» CSS3 浮动播放GIF图片
CSS3 浮动播放GIF图片
浏览:680次
-
评论:1次
-
发布时间:2018-01-09
Html
Css
Js
高速通讯
总线可供电,最远通讯距离可达3000米
body{ margin: 0; padding: 0; } .features-list{ margin: 0 auto; padding: 0; list-style: none; width: 1140px; height: 360px; -webkit-box-shadow: 0px -20px 60px 0px rgba(0,0,0,0.04); -moz-box-shadow: 0px -20px 60px 0px rgba(0,0,0,0.04); box-shadow: 0px -18px 20px 0px rgba(0,0,0,0.04); } .features-list li{ height: 180px; } .features-list .features,.features-list .features .img,.features-list .features img,.features-list .features span{ -webkit-transition: all 0.3s ease 0s; -moz-transition: all 0.3s ease 0s; -ms-transition: all 0.3s ease 0s; transition: all 0.3s ease 0s; } .features-list .features{ width: 190px; height: 100%; float: left; background-color: #fff; padding: 7px 14px 14px 14px; overflow: hidden; box-sizing:border-box; -moz-box-sizing:border-box; -webkit-box-sizing:border-box; } .features-list .first-row .features{ -webkit-box-shadow: inset -1px -1px 0px 0px #ededed; -moz-box-shadow: inset -1px -1px 0px 0px #ededed; box-shadow: inset -1px -1px 0px 0px #ededed; } .features-list .second-column .features{ -webkit-box-shadow: inset -1px 0px 0px 0px #ededed; -moz-box-shadow: inset -1px 0px 0px 0px #ededed; box-shadow: inset -1px 0px 0px 0px #ededed; } .features-list .first-row .features.row-last{ -webkit-box-shadow: inset 0px -1px 0px 0px #ededed; -moz-box-shadow: inset 0px -1px 0px 0px #ededed; box-shadow: inset 0px -1px 0px 0px #ededed; } .features-list .second-column .features.row-last{ -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; } .features-list .features:hover{ -webkit-box-shadow: 0px 0px 77px -1px rgba(0,0,0,0.37) !important; -moz-box-shadow: 0px 0px 77px -1px rgba(0,0,0,0.37) !important; box-shadow: 0px 0px 77px -1px rgba(0,0,0,0.37) !important; -webkit-transform: scale(1.15); -ms-transform: scale(1.15); transform: scale(1.15); z-index: 999; } .features-list .features:hover .img,.features-list .features:hover img{ -webkit-transform: scale(1.2); -ms-transform: scale(1.2); transform: scale(1.2); } .features-list .features:hover h4,.features-list .features:hover p{ -webkit-transform: scale(1); -ms-transform: scale(1); transform: scale(1); } .features-list .features .img{ display: block; text-align: center; } .features-list .features .img img{ width: 75px; height: 75px; } .features-list .features h4,.features-list .features p{ margin: 0; text-align: center; } .features-list .features h4{ font-size: 14px; padding: .7em; -moz-transition: .2s ease-in-out; -o-transition: .2s ease-in-out; -webkit-transition: .2s ease-in-out; transition: .2s ease-in-out; } .features-list .features p{ padding: 0 1em; color: #565656; font-size: 12px; }
$(function(){ for(var i = 0;i<5;i++){ $(".first-row").append($(".features:eq(0)").clone()); } for(var i = 0;i<6;i++){ $(".second-column").append($(".features:eq(0)").clone()); } var row1 = $(".first-row .features"); var row2 = $(".second-column .features"); $(row1[row1.length-1]).addClass("row-last"); $(row2[row2.length-1]).addClass("row-last"); $(".features-list .features").hover(function(){ $(this).find(".img>img").hide(); $(this).find(".img>span").show(); var gifImg = $(this).find(".img>span>img"); gifImg.attr("src",gifImg.attr("data")+"?"+new Date().getTime()); },function(){ $(this).find(".img>img").show(); $(this).find(".img>span").hide(); }); });
↑上面代码改变,会自动显示代码结果
jQuery调用版本:
1.11.3
<!doctype html><html><head><meta charset="utf-8"><title>CSS3 浮动播放GIF图片-www.sucainiu.com</title><script src="https://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script><style>
</style></head><body>
<script>
</script>
</body></html>
立即下载
收藏
积分说明:注册即送10牛币,每日签到可获得5牛币,成为VIP会员可永久免牛币下载!
充值积分
充值会员
更多说明»
代码描述:鼠标浮动放大内容,播放gif
一个简单试用的日历
CSS3移动端横向滑动效果
讨论这个常用代码(1)
回答他人问题或分享心得会奖励牛币
Lv10 CTO
华***n
2018年01月10日
学习了感谢分享
回复
文明上网,理性发言! 😉 阿里云幸运券,
戳我领取
发表评论
提交回复
我的积分余额:
0
已下载次数:
680
所需牛币:
5
开始下载
牛币获取:
签到、评论、充值
» 在线充值
(10牛币=1元)
成为VIP可永久免积分下载全部常用代码
» 查看详情
VIP
客服
签到
充值