jQuery实现鼠标移到图片悬浮提示特效



93 370 124



特效描述:jQuery实现 鼠标移到图片 悬浮提示特效,jQuery实现鼠标移到图片悬浮提示特效

代码结构

1. 引入CSS

<link rel="stylesheet" type="text/css" href="css/default.include.b2676e.css" media="all" />
<link rel="stylesheet" id="spi-render-css-css" href="css/render.css?ver=3.5.2" type="text/css" media="all" />
<link rel="stylesheet" type="text/css" href="css/default.include.b2676e.css" media="all" />
<link rel="stylesheet" id="spi-render-css-css" href="css/render.css?ver=3.5.2" type="text/css" media="all" />

2. 引入JS

<script type="text/javascript" src="js/default.include.c78d4e.js"></script>
<script type="text/javascript" src="js/async-share.js?ver=3.5.2"></script>
<script type="text/javascript" src="js/default.include-footer.304291.js"></script>
<script type="text/javascript" src="js/default.include.c78d4e.js"></script>
<script type="text/javascript" src="js/async-share.js?ver=3.5.2"></script>
<script type="text/javascript" src="js/default.include-footer.304291.js"></script>

3. HTML代码

<!DOCTYPE html><!--[if IE 7]>
<html class="ie ie7" lang="en-US">
<![endif]--><!--[if IE 8]>
<html class="ie ie8" lang="en-US">
<![endif]--><!--[if !(IE 7) | !(IE 8)  ]>
<!-->
<html lang="en-US">
<!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width" />
<title></title>
<style type="text/css" id="custom-background-css">
body.custom-background { background-color: #1e73be; }
</style>
</head>
<body class="page page-id-975 page-child parent-pageid-93 page-template page-template-page-templatesdemo-sit-php custom-background custom-font-enabled single-author full-width">
<div id="page" class="hfeed site">
	<div id="main" class="wrapper">
		<div id="primary" class="site-content">
			<div id="content" role="main">
            <article id="post-975" class="post-975 page type-page status-publish hentry">
                    <header class="entry-header">
                        <h1 class="entry-title">jQuery鼠标移到图片悬浮提示</h1>
                    </header>
				<div class="entry-content">
					Here you can test the Smart Image Tooltip for jQuery &amp; CSS.<br />
					<br />
				</div>
				<ul class="mrs-tabs-list">
					<li class="mrs-current-tab">
					<a id="force-click" href="#mrs-demos">Demos</a></li>
				</ul>
				<div class="mrs-tabs-content">
					<div id="mrs-demos" class="mrs-srm-demo mrs-tab mrs-current-content">
						<div class="srm-helper-demoarea" style="text-align: center;">
							<div id="sit-simple-demo">
								<h4>Thumbnails with Simple Template, Image width 
								set to 480px</h4>
								<a class="sit-preview" href="images/cat.jpg">
								<img alt="" src="images/cat-thumb.jpg" data-preview-url="images/cat-medium.jpg" /></a>
								<a class="sit-preview" href="images/bumbleebee.jpg">
								<img alt="" src="images/bumbleebee-thumb.jpg" data-preview-url="images/bumbleebee-medium.jpg" /></a>
								<a class="sit-preview" href="images/corals.jpg">
								<img alt="" src="images/corals-thumb.jpg" data-preview-url="images/corals-medium.jpg" /></a>
								<a class="sit-preview" href="images/flower.jpg">
								<img alt="" src="images/flower-thumb.jpg" data-preview-url="images/flower-medium.jpg" /></a>
								<a class="sit-preview" href="images/kittens.jpg">
								<img alt="" src="images/kittens-thumb.jpg" data-preview-url="images/kittens-medium.jpg" /></a>
							</div>
						</div>
					</div>
				</div>
				<script type="text/javascript">
    jQuery(document).ready(function() {
        jQuery("#sit-simple-demo .sit-preview").smartImageTooltip({previewTemplate: "simple", imageWidth: "480px"});
        jQuery("#sit-caption-demo .sit-preview").smartImageTooltip({previewTemplate: "caption", scaleDesktop: 70, scaleMobile: 55});
        jQuery("#sit-envato-demo .sit-preview").smartImageTooltip({previewTemplate: "envato", imageWidth: "500px"});
        jQuery("#sit-envato-link-demo .sit-preview").smartImageTooltip({previewTemplate: "envato"});
        jQuery("#sit-nolink-demo img.sit-thumb").smartImageTooltip({previewTemplate: "caption", imageWidth: "480px"});
    });
</script>
				</article>
        	</div>
			<div style="text-align:center;clear:both">
				<br>
			</div>
		</div>
	</div>
	<!-- #main .wrapper --></div>
<script type="text/javascript">
jQuery(document).ready(function() {        jQuery(".adminbar-quick-backup-run a").click(function(e) {
            e.preventDefault();
            var code = jQuery(this).attr("href").substr(11);
            jQuery.ajax({
                type: 'post', success: function(json) { alert(json.message); },
                dataType: 'json', data: { runquick: {id: 1, type: code, control: 0} },
                url: gdpt_ajax_url + '?action=presstools_backup_quick&_ajax_nonce=376ffa5105'
            });
        });
    });</script>
</body>
</html>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: 图片拖动 图片放大镜 图片叠加 图片翻转旋转 图片延迟加载 图片淡出淡进 图片全屏 图片头像上传 二维码 图片广告 图片放大缩小 html5图片动画 带缩略图的幻灯片 地图 图片滚动 图片滑动 图片切换 图片收缩展开 旋转木马 图片轮播 悬浮浮动漂浮 自动滚动图片轮播 图标导航菜单 弹出层拖动 背景切换 窗口提示框 滑动星星打分 手风琴 浮动提示框 图表 图片 头像截图 其他更多 预览 缩略图 图片广告 浮动提示框 单排图片 鼠标滑过

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到