基于jQuery CSS3实现鼠标悬停信息提示代码



67 264 89



特效描述:基于jQuery CSS3实现 鼠标悬停 信息提示,基于jQuery CSS3实现鼠标悬停信息提示代码

代码结构

1. 引入CSS

<link rel="stylesheet" href="css/demo.css">
<link rel="stylesheet" href="css/sweet-tooltip.css">

2. 引入JS

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/sweet-tooltip.js"></script>

3. HTML代码

	<div id="container">
		<div class="item-tooltip">
			<div class="item">
				<span class="top-title">Sweet Strong </span>
				<div class="image-item"><img src="images/sweet-strong.png" /></div>
			</div>
			<div class="item-information">
				<span class="title">Style Name </span>
				<span class="information-content">
					tooltip-sweet-strong
				</span>
				<span class="title">Example </span>
				<span class="information-content">
					Hover <a href="#" class="sweet-tooltip" data-style-tooltip="tooltip-sweet-strong" data-text-tooltip="Howdy, I'm your tooltip :) ">this link</a> to see how this tooltip works
				</span>
			</div>
		</div>
		<div class="item-tooltip">
			<div class="item">
				<span class="top-title">Mini Slick </span>
				<div class="image-item"><img src="images/mini-slick.png" /></div>
			</div>
			<div class="item-information">
				<span class="title">Style Name </span>
				<span class="information-content">
					tooltip-mini-slick
				</span>
				<span class="title">Example </span>
				<span class="information-content">
					Hover <a href="#" class="sweet-tooltip" data-style-tooltip="tooltip-mini-slick" data-text-tooltip="Edit Me? ">this link</a> to see how this tooltip works
				</span>
			</div>
		</div>
		<div class="item-tooltip">
			<div class="item">
				<span class="top-title">Big Grey </span>
				<div class="image-item"><img src="images/big-grey.png" /></div>
			</div>
			<div class="item-information">
				<span class="title">Style Name </span>
				<span class="information-content">
					tooltip-big-grey
				</span>
				<span class="title">Example </span>
				<span class="information-content">
					Hover <a href="#" class="sweet-tooltip" data-style-tooltip="tooltip-big-grey" data-text-tooltip="This is our tooltip. <br/> How about yours? ">this link</a> to see how this tooltip works
				</span>
			</div>
		</div>
		<div class="item-tooltip">
			<div class="item">
				<span class="top-title">Nightly </span>
				<div class="image-item"><img src="images/nightly.png" /></div>
			</div>
			<div class="item-information">
				<span class="title">Style Name </span>
				<span class="information-content">
					tooltip-nightly
				</span>
				<span class="title">Example </span>
				<span class="information-content">
					Hover <a href="#" class="sweet-tooltip" data-style-tooltip="tooltip-nightly" data-text-tooltip="Nightly Nightly">this link</a> to see how this tooltip works
				</span>
			</div>
		</div>
		<div class="item-tooltip">
			<div class="item">
				<span class="top-title">Shiny Red </span>
				<div class="image-item"><img src="images/shiny-red.png" /></div>
			</div>
			<div class="item-information">
				<span class="title">Style Name </span>
				<span class="information-content">
					tooltip-shiny-red
				</span>
				<span class="title">Example </span>
				<span class="information-content">
					Hover <a href="#" class="sweet-tooltip" data-style-tooltip="tooltip-shiny-red" data-text-tooltip="This is shiny red">this link</a> to see how this tooltip works
				</span>
			</div>
		</div>
		<div class="item-tooltip">
			<div class="item">
				<span class="top-title">Soft Blue </span>
				<div class="image-item"><img src="images/soft-blue.png" /></div>
			</div>
			<div class="item-information">
				<span class="title">Style Name </span>
				<span class="information-content">
					tooltip-soft-blue
				</span>
				<span class="title">Example </span>
				<span class="information-content">
					Hover <a href="#" class="sweet-tooltip" data-style-tooltip="tooltip-soft-blue" data-text-tooltip="Really soft blue">this link</a> to see how this tooltip works
				</span>
			</div>
		</div>
		<div class="item-tooltip">
			<div class="item">
				<span class="top-title">Big Yellow </span>
				<div class="image-item"><img src="images/big-yellow.png" /></div>
			</div>
			<div class="item-information">
				<span class="title">Style Name </span>
				<span class="information-content">
					tooltip-big-yellow
				</span>
				<span class="title">Example </span>
				<span class="information-content">
					Hover <a href="#" class="sweet-tooltip" data-style-tooltip="tooltip-big-yellow" data-text-tooltip="This is big yellow">this link</a> to see how this tooltip works
				</span>
			</div>
		</div>
	</div>
<div style="text-align:center;clear:both">
</div>



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


热门标签: 文字叠加 文字拖动 文字提示框 文字收缩展开 文字放大缩小 文字翻转旋转 文字淡出淡进 文字全屏 文字延迟加载 360全景 html5文字动画 文字滚动 文字滑动 文字切换 弹出层拖动 窗口提示框 滑动星星打分 图片文字 文字导航菜单 文字 其他更多 鼠标悬停 文字标签 文字提示框

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

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

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