在1024*768的情况下,浮动广告是紧贴两边的,和中间内容距离很近,很合适,但是一旦分辨率变大,他还是紧贴两边,这时距离中间内容就很远了,能不能让他不管在什么分辨率下距离中间内容距离一样呢????

解决方案 »

  1.   

    用js得到屏幕的分辨率然后定位广告的left值.
      

  2.   

    window.screen.width>800 ? (window.screen.width>1024 ? imgheight_close=880 : imgheight_close=625):imgheight_close=455
    window.screen.height>600 ? (window.screen.width>1024 ? left=530 : left=275):left=50
      

  3.   

    window.screen.width>800 ? (window.screen.width>1024 ? imgheight_close=880 : imgheight_close=625):imgheight_close=455
    window.screen.height>600 ? (window.screen.width>1024 ? left=530 : left=275):left=50