zoukankan      html  css  js  c++  java
  • ie6 position fixed

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <style type="text/css">
    body{height:2000px;}
    a{text-decoration:none;}
    #top{width:60px;height:60px;background:#ccc;position:fixed;bottom:30px;right:30px;font:12px/60px 宋体;text-align:center;cursor:pointer;color:#666;}
    #top:hover{background:#181818;color:#fff;}
    </style>
    <!--[if lte IE 6]>
    <style type='text/css'>
    body{background:url(null) fixed;}
    #top{position:absolute;top:expression(parseInt(document.documentElement.clientHeight-90+document.documentElement.scrollTop));}
    </style>
    <![endif]-->
    </head>
    
    <body>
    <a href="#" id="top" onclick="window.scrollTo(0,0);return false;">返回顶部</a>
    </body>
    </html>

    其实现在真的可以无视IE6了吧,唉,这恶心的expression,就记一下吧,备忘。。。

  • 相关阅读:
    常建的性能指标
    性能测试常见分类
    性能测试相关概念和指标
    adb命令熟悉
    打包ajax生成小工具
    深入理解类加载demo
    设计模式七大原则
    javamail邮件实现
    @RequiredArgsConstructor用法
    spring-security查询数据库源码解析
  • 原文地址:https://www.cnblogs.com/hejia/p/2881947.html
Copyright © 2011-2022 走看看