- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
这是我一段时间以来一直试图解决的问题!我四处寻找解决方案,但找不到。首先是我的 html 的结构(只是骨架框架)-
<body>
<div class="header"> </div>
<div id="content-wrapper">
<a href="/some.html"><div class="feedback_div"></div></a>
</div>
<div id="footer-wrapper"></div>
</body>
现在我的.feedback div 已被定位 到固定 并给出了top: 40%;
和 right: 0;
还有 z-index(当然)。虽然这在所有浏览器中都正常工作,但 IE 6 却把它搞砸了。所以为了在 IE 6 上复制它的效果,我得到了这个解决方案 -
/* IE 6 only */
* .feedback_div
{
z-index: 9998;
position: absolute;
top: expression( (( t=document.documentElement.scrollTop) ? t: document.body.scrollTop) +'px');
right: -140px;
}
* #content-wrapper
{
position: relative;
z-index: 9999;
}
* #footer-wrapper
{
z-index: 0;
position: relative;
}
* html
{
overflow: auto;
}
* html body
{
height: 100%; /* required */
}
/* END: IE 6 only */
但现在的问题是,虽然 .feedback div 在您滚动时跟随您,但当它到达 .footer div 时,反馈 div 在它后面。我尝试使用 z-index,但没有任何效果。
现在我知道理想的解决方案是重新构建 html,使 .feedback div 成为 <body>
的子元素。 .但我不想改变结构,因为这意味着在后端乱搞。我希望仅针对 ie .. 解决此问题,所以只要它按预期工作,即使是某种形式的 hack 也可以。
那么有人对此有解决方案吗?任何帮助将不胜感激。
最佳答案
代码中有一些错误:
a
标签内有一个 div
标签,该标签无效。浏览器会将 div
元素移到 a
元素之外。div
上有 class="feedback"
,但你在 CSS 中使用 .feedback_div
,所以样式不会不适用。当您使用 z-index 时,它应用于同一级别的元素,因此您可以将它应用于反馈元素的父级,因为它与页脚处于同一级别。
关于html - IE 6 z-index 和位置 : fixed; issue,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7963104/
我不知道我做了什么来破坏我的 QtCreator,但是“突然”我所有的编译器问题(警告/错误)不再显示在问题面板中,而是只显示在“编译输出”面板中(我在那里不能使用它们通过单击跳转到错误代码)。 在“
我正在制作游戏作为自学。 我的目标是在鼠标指针后面有一条轨迹。(这有效)但是,当我在 chrome 上打开并运行它时。在达到一定的高度和宽度后,轨迹保留在 Canvas 上而不是被擦掉。谁能帮我解决这
我希望通过在我的HTML文件中适当地格式化我的网站上的文本来增强它的外观。具体地说,我希望确保我的HTML文件中的代码在网站上显示得很好。此外,我正在寻求帮助实现我的网站导航栏。,我希望和其他内容显示
我希望通过在我的HTML文件中适当地格式化我的网站上的文本来增强它的外观。具体地说,我希望确保我的HTML文件中的代码在网站上显示得很好。此外,我正在寻求帮助实现我的网站导航栏。,我希望和其他内容显示
我希望通过在我的HTML文件中适当地格式化我的网站上的文本来增强它的外观。具体地说,我希望确保我的HTML文件中的代码在网站上显示得很好。此外,我正在寻求帮助实现我的网站导航栏。,我希望和其他内容显示
我一直在尝试将背景图像添加到 html 文档中元素的边框: 你可以在这里看到:HTML: Something CSS: a { border-width:10px; border-co
我即将开始一个连接两个程序的项目,一个用c#,一个用c++。我已经有一个可以工作的 c# 程序,它能够与自身的其他版本对话。在开始使用c++版本之前,我想到了一些问题: 1) 我正在使用 protob
我正在尝试线程优先级的影响,当 run 方法中的 println 保留在注释中时,两个线程同时结束,我不理解这种行为,你能解释一下吗?谢谢。 主类 public class Main { public
jQuery 1.4: $('#menu li:last:not(.ignore)').addClass('last'); HTML: item 1 ite
当我创建或查看问题时,我想从Mantis问题跟踪系统中删除选择配置文件及其所有随附字段,因为这些问题与我要创建的任何问题都不相关。 其中包括配置文件部分随附的“平台”,“操作系统”和“操作系统版本”字
我不在Master分支上工作。我正在开发另一种newFeature,该功能也发布在github上。 我知道在处理Master分支时如何解决问题:Closes #XXX。 但是,这仅在我在Master分
我需要在一些UICollectionViewCell中画一个圆圈。具有不同颜色边框和背景颜色的圆圈。我的代码。 UICollectionViewController - (UICollectionVi
我们将Trac用于我正在从事的开源项目。我想将所有公开票导出到Github的Issues。我已经找到了一些可能的小型脚本,但是我想知道是否有人这样做并提出了建议。 理想情况下,它将trac的描述语法转
我对 iOS 编程还比较陌生,但在其他语言(主要是 C# 和 Java)方面拥有丰富的编程经验。 我正在尝试为 iPad 设备的某些产品制作一个类似图片库的东西,其中包含指定的类别。用户界面非常简单,
我已经在中间人中激活了 I18n,如下所示: activate :i18n, mount_at_root: :de 现在我想自动从 / 重定向到 /de。这可能吗? 另外,我想知道为什么中间人使用 p
我已经成功编写了一个程序,可以从 Excel 文件中读取数据并将它们存储在 mysql 的表中。我的程序读取每个文件的第一行,创建表的字段,并将其余数据存储为每列中的值。正是因为这种情况以编程方式发生
这是我的代码。 function m1() { return new Promise(function(resolve, reject) { var files = $('#aws-upl
谁能告诉我这是怎么回事? #include #include #include #include #include class writeManager { std::vector
compile 'com.github.RogaLabs:social-login:1.2.1' compile 'com.github.mukeshsolanki:social-login-help
我有一个巨大的 csv 文件,其中包含 149 列 和 25K+ 行,可以在 MySQL 中上传该文件> 我正在使用MySQL LOAD DATA 查询 表我的查询是: LOAD DATA local
我是一名优秀的程序员,十分优秀!