js工具提示插件



7 25 9



特效描述:工具提示,js工具提示插件 

代码结构

1. 引入CSS

<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/tippy.css">

2. 引入JS

<script src="js/tippy.js"></script>

3. HTML代码

<div class="container">
	<div class="row" style="padding: 30px 0;">
		<div class="col-md-4"><button class="btn btn-primary tippy" title="I'm a tooltip!">默认的tooltip效果</button></div>
		<div class="col-md-4"><button class="btn btn-primary tippy-right" title="I'm a tooltip!">tooltip显示在右侧</button></div>
		<div class="col-md-4"><button class="btn btn-primary tippy-arrow" title="I'm a tooltip!">带箭头的tooltip效果</button></div>
	</div>
	<div class="row" style="padding: 30px 0;">
		<div class="col-md-4"><button class="btn btn-primary tippy-scale" title="I'm a tooltip!">tooltip 缩放动画效果</button></div>
		<div class="col-md-4"><button class="btn btn-primary tippy-perspective" title="I'm a tooltip!">tooltip 翻转动画效果</button></div>
		<div class="col-md-4"><button class="btn btn-primary tippy-shift" title="I'm a tooltip!">tooltip 位移动画效果</button></div>
	</div>
	<div class="row" style="padding: 30px 0;">
		<div class="col-md-4"><button class="btn btn-primary tippy-light" title="I'm a tooltip!">亮色主题效果</button></div>
		<div class="col-md-4"><button class="btn btn-primary tippy-honeybee" title="I'm a tooltip!">自定义主题</button></div>
		<div class="col-md-4"><button class="btn btn-primary " id="tooltip-with-my-template" title="I'm a tooltip!">自定义HTML模板</button></div>
	</div>
	<!--自定义HTML模板-->
	<div id="my-template-id" style="display: none;">
	  <p>Fun <strong>non-interactive HTML</strong> here</p>
	  <img alt="" height="150" src="img/1.jpg">
	</div>
</div>
<script type="text/javascript">
	new Tippy('.tippy');
	new Tippy('.tippy-right', { position: 'right', animation: 'fade' })
	new Tippy('.tippy-scale', { position: 'top', animation: 'scale',arrow:'true'  })
	new Tippy('.tippy-arrow', { position: 'top', animation: 'scale',arrow:'true' });
	new Tippy('.tippy-perspective', { position: 'top', animation: 'perspective',arrow:'true' });
	new Tippy('.tippy-shift', { position: 'top', animation: 'shift',arrow:'true' });
	new Tippy('.tippy-light', { position: 'top', animation: 'scale',arrow:'true','theme':'light' })
	new Tippy('.tippy-honeybee', { position: 'top', animation: 'scale',arrow:'true',theme:'honeybee' });
	new Tippy('#tooltip-with-my-template', {
	  position:'bottom',
	  html: '#my-template-id',
	  arrow: true,
	  animation: 'fade'
	})
</script>
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
</div>



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


热门标签: 右键菜单 文字提示框 提示框/弹出层 layer lightbox Tooltip工具提示框 浮动提示框 html5弹窗动画 弹出层拖动 窗口提示框

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

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

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