ITeye博客

固定poshytip提示框小箭头位置

tdttyl.cwm · 2013-06-19 13:37 · web · Web前端 · jQuery · poshytip · Markdown

在poshytip的样式文件中,可以看到提示框的小箭头默认是50%位置(以右弹为例)

.tip-yellowsimple .tip-arrow-left {
	margin-top:-4px; /* approx. half the height to center it */
	margin-left:-6px;
	top:50%;
	left:0;
	width:6px;
	height:9px;
	background:url(tip-yellowsimple_arrows.gif) no-repeat -27px 0;
}

 为了避免提示框的箭头不随内容变多而改变位置,可以修改箭头的样式文件,我修改为距上20px

.tip-yellowsimple .tip-arrow-left {
	margin-top:-4px; /* approx. half the height to center it */
	margin-left:-6px;
	top:20px;
	left:0;
	width:6px;
	height:9px;
	background:url(tip-yellowsimple_arrows.gif) no-repeat -27px 0;
}

 这样,小箭头的位置就可以相对target固定位置了。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。