ツールチップに何も設定されていない場合でも、qTip がマージンを追加するのはなぜですか?
私が使用しているqTip構成は次のとおりです。
$.fn.qtip.styles.mystyle = {
width: 200,
background: '#b7d5f4',
color: '#212121',
textAlign: 'left',
border: {
width: 1,
radius: 5,
color: '#b7d5f4'
},
tip: 'bottomLeft',
name: 'dark'
}
$.each($(".tooltip"), function(i,val){
var theContent = $(val).html();
$(val).qtip({
content: theContent,
position: {
corner: {
target: 'topRight',
tooltip: 'bottomLeft'
}
},
style: 'mystyle'
});
});
コンテンツ div のクラス スタイルは次のようになります。
.ttContent
{
width: 200px;
margin-left: -8px;
margin-top: -15px;
}
ここで適切なマージンを得るために負のマージンを使用する必要があるのはなぜですか?