html 图像重叠 position 及 display overflow 边框像素

8 篇文章 0 订阅


<style type="text/css">
.im
{
width:40px;
height:40px;
border:0px solid red;
vertical-align:top;
display:block;
position: relative;
Z-index:10;
left:0px;
top:-40px;
}

</style>
<table border=1 style="width:100%">
<tr>
 <td style="width:50%;">
  1111
 </td>
 <td>
  2222
 </td>
</tr>
<tr>
 <td>
  111
 </td>
 <td>
  <div style = "border:1px solid red;width:500px;height:300px;overflow:hidden;">
   <img src="001.jpg" style ="border:1px solid red;width:500px;height:290px;display:block;"></img>

   <img border='0' src="002.jpg" id = "show" name= "show" class="im" usemap="#umap"></img>
   <map name="umap">
    <area shape="rect" coords="0,0,40,40" href ="javascript:void(0)" onclick = "aaa();"/>
   </map>
  </div>
 </td>
</tr>
</table>
<script type="text/javascript">
 function aaa(){
  alert("1111");
  document.getElementById("show").src = "003.jpg";
 }
 function bbb(){
  alert("1111");
  document.getElementById("show2").src = "003.jpg";
  sss = document.getElementById("show2").style;
  alert(sss);
 }
</script>
   
   <!--<div style = "position: relative;Z-index:10;left:0px;top:-110px;bottom:0px;">

   <img border='0' src="002.jpg" id = "show" name= "show" style ="display:block;position: relative;Z-index:10;left:0px;top:-110px;width:100px;height:100px" usemap="#umap"></img>
   <img border='0' src="002.jpg" id = "show2" name= "show2" style ="display:block;position: relative;Z-index:10;left:110px;top:-220px;width:100px;height:100px" usemap="#u2map"></img>
   <map name="umap">
    <area shape="rect" coords="0,0,100,100" href ="javascript:void(0)" onclick = "aaa();"/>
   </map>
   <!--<div style = "position: relative;Z-index:10;left:110px;top:-220px;bottom:0px;">-->
   
   
   <map name="u2map">
    <area shape="rect" coords="0,0,100,100" href ="javascript:void(0)" onclick = "bbb();"/>
   </map>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值