嗨我想使用Java Script ToolTip,在工具提示中每个背景都会有所不同,具体取决于我们当前正在盘旋的项目所以我不能使用Css来设置背景 - 我尝试了不同的方法,最好的方法是使用桌子,但在桌子上,背景图像从盒子的下半部分开始(差不多)!
我该怎么办?
Thx提前
*{
margin:0;
}
.MainContainer{
height:270px;
width:230px;
border-radius: 5px;
box-shadow:0.3px 0.2px 0.3px #66FFFF;
z-index:0;
padding:1px;
overflow:hidden;
}
.NameContainer{
position:relative;
height:40px;
background-color:black;
z-index:2;
border-radius:5px 5px 0 0;
opacity:0.7;
padding:2px;
}
.typeImg{
margin:3px;
position: relative;
top:-42px;
float:right;
z-index:3;
}
.heroName{
margin:8px;
position: relative;
top:-42px;
float:left;
z-index:3;
font-family: KoreanFont,georgia,serif;
letter-spacing: 1px;
font-size:20px;
color:white;
}
.SpellContainer{
position:relative;
height:55px;
top:168px;
background-color:black;
z-index:2;
border-radius:0px 0px 5px 5px;
opacity:0.8;
padding:2px;
}
.abiImg{
margin-left:10px;
position: relative;
box-shadow: 0.3px 0.3px 0.3px #fff;
top:117px;
float:left;
z-index:3;
}

<div class="MainContainer">
<table background="drow_ranger_vert.jpg" style="height:270px;width:230px;z-index:0;">
<div class="NameContainer"></div>
<img alt="Agility" title="Agility" class="typeImg" src="overviewicon_agi.png" border="0" height="33" width="33">
<span class="heroName"> Drow Ranger </span>
<div class="SpellContainer"></div>
<img alt="Frost Arrows" title="Frost Arrows" class="abiImg" src="drow_ranger_frost_arrows_hp2.png" border="0" height="45" width="45">
<img alt="Gust" title="Gust" class="abiImg" src="drow_ranger_silence_hp2.png" border="0" height="45" width="45">
<img alt="Precision Aura" title="Precision Aura" class="abiImg" src="drow_ranger_trueshot_hp2.png" border="0" height="45" width="45">
<img alt="Marksmanship" title="Marksmanship" class="abiImg" src="drow_ranger_marksmanship_hp2.png" border="0" height="45" width="45"></table>
</div>
&#13;