Html 删除奇怪的空间
问题:Html 删除奇怪的空间,html,css,Html,Css,问题: <div id="ball"> <div id="thisisatest" onmouseover="showIt('/images/em.png', 'tomJustice')" onmouseout="hideIt('tomJustice')" > <img src="/images/bluesquare.png" height="15" width="15" ></img> t
<div id="ball">
<div id="thisisatest" onmouseover="showIt('/images/em.png', 'tomJustice')" onmouseout="hideIt('tomJustice')" >
<img src="/images/bluesquare.png" height="15" width="15" ></img> tom Justice
<img src="" id="tomJustice" style="margin-left: auto; overflow:hidden; padding-top: 20%" onclick="showIt('/images/card22.png', 'tomJustice2')" onmouseout="hideIt('tomJustice2')">
<img src="" id="tomJustice2" style="display:none"></img>
</br>
</div>
... other contacts
</div>
如何去掉第一张图中显示的空间
更多信息和代码:
<div id="ball">
<div id="thisisatest" onmouseover="showIt('/images/em.png', 'tomJustice')" onmouseout="hideIt('tomJustice')" >
<img src="/images/bluesquare.png" height="15" width="15" ></img> tom Justice
<img src="" id="tomJustice" style="margin-left: auto; overflow:hidden; padding-top: 20%" onclick="showIt('/images/card22.png', 'tomJustice2')" onmouseout="hideIt('tomJustice2')">
<img src="" id="tomJustice2" style="display:none"></img>
</br>
</div>
... other contacts
</div>
我有一个联系人名单,我想安排在上面的其他。当用户将鼠标悬停在联系人姓名上时,会弹出一张联系人卡。在联系人卡上,我想要一个电子邮件图标
当电子邮件图标位于右上角时-没有问题。但是,当我添加填充以将其移动到联系人卡的右下角时,当页面首次加载时,联系人姓名之间会出现一个奇怪的空格。然而,当我将鼠标移到上面,联系人卡出现后,奇怪的空间消失了,联系人列表以我希望的方式出现
这是我的密码:
html:
<div id="ball">
<div id="thisisatest" onmouseover="showIt('/images/em.png', 'tomJustice')" onmouseout="hideIt('tomJustice')" >
<img src="/images/bluesquare.png" height="15" width="15" ></img> tom Justice
<img src="" id="tomJustice" style="margin-left: auto; overflow:hidden; padding-top: 20%" onclick="showIt('/images/card22.png', 'tomJustice2')" onmouseout="hideIt('tomJustice2')">
<img src="" id="tomJustice2" style="display:none"></img>
</br>
</div>
... other contacts
</div>
汤姆·贾斯蒂斯
... 其他联系人
你为什么不给我一个
position:absolute;
和
right: 0; bottom: 0;
您只需在div中定位JavaScript函数中的内容showIt(imgPath,ID\u name)?您必须设置图像的高度,否则浏览器无法计算元素的垂直位置。如果您能显示一个工作演示,最好能看到问题,为yougenius修复语法和拼写!位置必须是相对的,而不是绝对的,右边的,底部的位置需要一些调整,但它是有效的。谢谢没问题,很高兴我能帮上忙,是的,我错了,职位已经晚了