• 两张图相对于第三张大图定位


      今天切图,想在两个图片上加个超链接,为了解决兼容性问题没有使用<area> 标签,想通过定位来实现,但是试了很多次,在不同的分辨率下都对不齐,移位了,后来想到msn网站上有两个图片也是通过定位来解决的,而且在任何分辨率下都不会偏移,因此依照msn官网的写法,果然实现了,代码如下:

      <body style="background:#7eb41e url(images/zhaoPin.jpg) no-repeat center top;margin:0px;padding:0px;">

      <a href="#"><div style=" background:url(images/zp1.jpg) no-repeat 0px 0px;369px;height:201px;position: fixed;_position: absolute;top: 365px; _top:expression(eval(document.documentElement.scrollTop+40));left: 50%; margin-left:-419px;"></div></a>
      <a href="#"><div style=" background:url(images/zp2.jpg) no-repeat right top;369px; height:201px;position: fixed;_position: absolute;top: 363px; _top:expression(eval(document.documentElement.scrollTop+40));margin-left:65px;left: 50%;"></a></div></a>
      </body>

    但是这有个问题,我百思不得其解,我用left:28%;如果改变分辨率的话图片就会移位,但是如果用left: 50%;和margin-left:65px;的时候更改分辨率图片就不会移位。

  • 相关阅读:
    python操作Excel读写--使用xlrd
    python 使用pymssql连接sql server数据库
    python pdb调试
    sqlser生成guid与复制造数
    sqlser游标与for循环
    bat写循环
    Jenkins配置多任务
    git命令行与Jenkins
    Jenkins执行python脚本
    Windows环境Jenkins配置免密登录Linux
  • 原文地址:https://www.cnblogs.com/fuyali/p/4347564.html
Copyright © 2020-2023  润新知