本效果使用jQuery和CSS实现了图片列表,当鼠标移入时图片向左微动,移出则复原。

效果展示http://hovertree.com/texiao/jquery/88/

效果图如下:

其中的jQuery事件使用mouseenter 和 mouseleave ,事件绑定方法使用新推荐的on方法。具体请参考:
http://hovertree.com/h/bjaf/ug1fikri.htm

代码如下:

<!DOCTYPE html>
<html>
<head><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>jQuery实现图片列表鼠标移入微动_何问起</title><base target="_blank" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
body, div, li, p, img, a {
margin: 0;
padding: 0;
} .hovertreecontainer {
width: 370px;
margin: 50px auto;
} .hovertreecontainer a {
text-decoration: none;
} .hovertree-item-box {
height: 120px;
width: 185px;
position: relative;
padding: 10px;
box-sizing: border-box;
float: left;
} .hovertree-item-box .title {
width: 80px;
height: 100%;
color: #4998a1;
font-size: 14px;
} .hovertree-item-box.odd {
border-bottom: 1px solid #CCC;
border-right: 1px solid #CCC;
} .hovertree-item-box.even {
border-bottom: 1px solid #CCC;
} .hovertree-item-box.nobottom {
border-bottom: none;
} .hovertree-item-box .hovertree-img-box {
width: 80px;
height: 80px;
overflow: hidden;
position: absolute;
right: 10px;
bottom: 5px;
} .hovertree-img-box img {
width: 100%;
height: 100%;
} .hovertreecontainer:after {
content: "";
display: block;
clear: both;
}
</style>
</head>
<body> <div class="hovertreecontainer"><h2>jQuery实现图片列表鼠标移入微动</h2>
<a href="http://hovertree.com/texiao/css/20/">
<div class="hovertree-item-box odd">
<div class="title">春节对联</div>
<div class="hovertree-img-box"><img src="http://hovertree.com/hvtimg/201512/o9qashmi.gif"></div>
</div>
</a>
<a href="http://hovertree.com/hvtart/bjae/a6w6e2qg.htm">
<div class="hovertree-item-box even">
<div class="title">下雨天</div>
<div class="hovertree-img-box"><img src="http://hovertree.com/hvtimg/201512/f748s0ko.jpg"></div>
</div>
</a>
<a href="http://hovertree.com/h/bjae/0st5ww13.htm">
<div class="hovertree-item-box odd">
<div class="title">磨砂玻璃</div>
<div class="hovertree-img-box"><img src="http://hovertree.com/hvtimg/201512/agagq0or.jpg"></div>
</div>
</a>
<a href="http://hovertree.com/menu/texiao/">
<div class="hovertree-item-box even">
<div class="title">网页特效</div>
<div class="hovertree-img-box"><img src="http://hovertree.com/hvtimg/201512/r51a22uy.gif"></div>
</div>
</a>
<a href="http://hovertree.com/h/bjaf/hwqtjwjs.htm">
<div class="hovertree-item-box odd nobottom">
<div class="title">何问起统计文件数</div>
<div class="hovertree-img-box"><img src="http://hovertree.com/hvtimg/bjafjd/iofopnro.png"></div>
</div>
</a>
<a href="http://hovertree.com/h/bjaf/hovertreeimg.htm">
<div class="hovertree-item-box even nobottom">
<div class="title">HovertreeImg</div>
<div class="hovertree-img-box"><img src="http://hovertree.com/hvtimg/201601/p3t2ldyr.png"></div>
</div>
</a> <div><a href="http://hovertree.com/h/bjaf/4mv4wgmj.htm">原文</a> <a href="http://hovertree.com">首页</a> <a href="http://hovertree.com/menu/texiao/">特效</a></div>
</div>
<script type="text/javascript" src="http://down.hovertree.com/jquery/jquery-1.11.3.min.js"></script>
<script type="text/javascript">
$(function () {
$('.hovertreecontainer .hover'+'tree-item-box').on('mouseenter', function (ev) {
var oImgBox = $(this).find('.hovertree-img-box'); $(oImgBox).stop(true).animate({
right: '20px'
}, "normal");
}).on('mouseleave', function (ev) {
var oImgBox = $(this).find('.hovertree-img-box'); $(oImgBox).stop(true).animate({
right: '10px'
}, "normal");
});
});
</script>
</body>
</html>

转自:http://hovertree.com/h/bjaf/4mv4wgmj.htm

特效汇总:http://www.cnblogs.com/jihua/p/webfront.html

jQ图片列表光标移动动画的更多相关文章

  1. WPF自定义控件与样式(12)-缩略图ThumbnailImage /gif动画图/图片列表

    一.前言 申明:WPF自定义控件与样式是一个系列文章,前后是有些关联的,但大多是按照由简到繁的顺序逐步发布的等,若有不明白的地方可以参考本系列前面的文章,文末附有部分文章链接. 本文主要针对WPF项目 ...

  2. jQuery演示10种不同的切换图片列表动画效果

    经常用到的图片插件演示jQuery十种不同的切换图片列表动画效果 在线演示 下载地址 实例代码 <!DOCTYPE html> <html lang="en" c ...

  3. jQuery演示10种不同的切换图片列表动画效果以及tab动画演示 2

    很常用的一款特效纯CSS完成tab实现5种不同切换对应内容效果 实例预览 下载地址 实例代码 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ...

  4. 【转】WPF自定义控件与样式(12)-缩略图ThumbnailImage /gif动画图/图片列表

    一.前言 申明:WPF自定义控件与样式是一个系列文章,前后是有些关联的,但大多是按照由简到繁的顺序逐步发布的等,若有不明白的地方可以参考本系列前面的文章,文末附有部分文章链接. 本文主要针对WPF项目 ...

  5. jquery控制左右箭头滚动图片列表

    jquery控制左右箭头滚动图片列表的实例. 代码如下: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN&q ...

  6. jQuery css3鼠标悬停图片显示遮罩层动画特效

    jQuery css3鼠标悬停图片显示遮罩层动画特效 效果体验:http://hovertree.com/texiao/jquery/39/ 效果图: 源码下载:http://hovertree.co ...

  7. CSS图片列表

    1.效果图: 2.Example Source Code <h3><a href="http://www.52css.com/">我爱CSS画廊</a ...

  8. HTML5+javascript实现图片加载进度动画效果

    在网上找资料的时候,看到网上有图片加载进度的效果,手痒就自己也写了一个. 图片加载完后,隐藏loading效果. 想看加载效果,请ctrel+F5强制刷新或者清理缓存. 效果预览:   0%   // ...

  9. WP8_区分滑动和点击(在图片列表中)

    在windows phone中,对于一个页面中 有图片列表的,滑动的时候,很容易被误认为是点击了图片,而打开图片详细信息等,原意是滑动列表,由此对图片添加2个事件,来控制其点击行为(滑动的时候,基本不 ...

随机推荐

  1. 给缺少Python项目实战经验的人

    我们在学习过程中最容易犯的一个错误就是:看的多动手的少,特别是对于一些项目的开发学习就更少了! 没有一个完整的项目开发过程,是不会对整个开发流程以及理论知识有牢固的认知的,对于怎样将所学的理论知识应用 ...

  2. babel-loader-presets

    babel-loader的presets的设置有一定的顺序.es2015必须出现在stage-0前面,我记得这是因为es2015是ES6的标准,state-0等是对ES7一些提案的支持, state- ...

  3. Joshua Bloch错了? ——适当改变你的Builder模式实现

    注:这一系列都是小品文.它们偏重的并不是如何实现模式,而是一系列在模式实现,使用等众多方面绝对值得思考的问题.如果您仅仅希望知道一个模式该如何实现,那么整个系列都会让您失望.如果您希望更深入地了解各个 ...

  4. clang_intprt_t类型探究

    作者:玄魂工作室-钱海龙 问题 这篇手把手教你构建 C 语言编译器,里面有着这样的代码 void eval() { int op, *tmp; while (1) { if (op == IMM) { ...

  5. what's deviceone

    DeviceOne技术介绍 一.     DeviceOne是什么 DeviceOne(以下简称Do)是一个移动开发的平台或技术,与之对等的是Android移动开发技术,iOS移动开发技术,Windo ...

  6. 探索C#之系列目录导航

    1. 探索c#之函数创建和闭包 2. 探索c#之尾递归编译器优化 3. 探索c#之不可变数据类型 4. 探索c#之递归APS和CPS 5. 探索c#之一致性Hash详解 6. 探索c#之微型MapRe ...

  7. iOS---基于对Sqlilte3的二次包装的第三次包装--->JKDBModel ,一个好用的离线缓存库

    https://github.com/Joker-King/JKDBModel 1.将FMDB和DBModel拖入项目中,然后添加libsqlite3.dylib   2. #import " ...

  8. C++多态详解

    多态是面向对象的程序设计的关键技术.多态:调用同一个函数名,可以根据需要但实现不同的功能.多态体现在两个方面,我们以前学过的编译时的多态性(函数重载)和现在我们这一章将要学习的运行时的多态性(虚函数) ...

  9. web标准之道——笔记

    字体设置 sans和sans-serif为通用字体,具体哪个字体被最终应用由浏览器决定,通用字体只有在其他字体都无效时才会被当作代替方案.通用字体应该放在最后面 sans衬线字体 容易阅读,一般使用在 ...

  10. MVC视图展现模式之移动布局解析-续集

    网站就必须用响应式布局吗?MVC视图展现模式之移动布局:http://www.cnblogs.com/dunitian/p/5213787.html demo:http://pan.baidu.com ...