JavaScript弹出框 绝对居中 于浏览器底部 背景透明 兼容所有浏览器和手机APP 百分百宽度

<div style="width:100%;height:80px;margin:0 auto;position:fixed;bottom:20px;opacity:0.8" id="popBox">
  <div style="background-color:#333;color:#FFF;position:fixed;padding:10px;border-radius:6px" id="box">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td style="cursor:pointer;background:url(http://www.sms3tong.com/v4/images/hjht/close_ico.png) no-repeat;width:11px;height:11px" onclick="document.getElementById('popBox').style.display = 'none'"></td>
        <td colspan="2"></td>
      </tr>
      <tr>
        <td><img src="http://s3.amazonaws.com/robotc-wiki/wiki-images/c/cb/Warning.png" /></td>
        <td style="font-size:13px">http://my.oschina.net/cart/编程交流,经验总结,欢迎前来免费咨询。</td>
        <td style="background:url(http://c.dryicons.com/images/icon_sets/coquette_part_4_icons_set/png/64x64/green_button.png) no-repeat;width:64px;height:64px"><a href="http://my.oschina.net/cart/" style="color:#FFF;padding-left:17px;text-decoration:none"><strong>打开</strong></a></td>
      </tr>
    </table>
  </div>
</div>
<script type="text/javascript">
document.getElementById('popBox').style.left = (document.documentElement.clientWidth-document.getElementById('box').clientWidth)/2+'px';
</script>


JavaScript弹出框 绝对居中 于浏览器底部 背景透明 兼容所有浏览器和手机APP 百分百宽度_第1张图片

你可能感兴趣的:(背景透明,JavaScript弹出框,于浏览器底部,兼容所有浏览器和手机APP,百分百宽度,绝对居中)