• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

HTML悬浮提示

武飞扬头像
.陌路
帮助1

学新通

function txm1Function() {
	tip("txm1", "最大长度不得超过30", false);
}

function tip(id, msg, flag) {
	flag = typeof flag == 'undefined' ? true : flag;
	var html = '<span class="category-pop">'  
		'<s class="pop-l"><</s>'  
		'<a href="javascript:void(0)">'   msg   '</a>'  
		'<s class="pop-r"></s>'  
		'</span>';
	var offset = $('#'   id).offset();
	if (flag) {
		$('#'   id).unbind('hover').hover(function () {
			$(this).after($(html).css({top: offset.top, left: offset.left   $(this).width() - 80}));
		}, function () {
			$('span.category-pop').remove();
		});
	} else {
		$('span.category-pop').remove();
		$('#'   id).after($(html).css({top: offset.top, left: offset.left   $('#'   id).width() - 80}));
	}
};
学新通
.category-pop {
	top: 8px;
	height: 21px;
	position: absolute;
	background-color: #FFF8D9;
	border: 1px solid #FEBE8F;
	margin-left: 95px;
}
.category-pop .pop-l {
	left: -9px;
	color: #FEBE8F;
	position: absolute;
	transform: rotate(-25deg);
	display: inline-block;
	z-index: -1;
}
.category-pop s {
	display: inline-block;
	position: absolute;
	top: 1px;
	width: 7px;
	height: 23px;
}
.category-pop a {
	font-weight: normal;
	font-size: 12px;
	color: #F60;
	width: auto;
	height: 21px;
	line-height: 21px;
	margin: 0;
	text-indent: 0;
	padding: 0 7px 1px;
	text-decoration: none;
}
.category-pop .pop-r {
	right: -1px;
}

学新通

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhhahagk
系列文章
更多 icon
同类精品
更多 icon
继续加载