加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

html – 粘贴页脚链接在Firefox和Chrome中无法点击

发布时间:2020-12-14 23:00:45 所属栏目:资源 来源:网络整理
导读:我正在使用如下所述的粘性页脚: How do you get the footer to stay at the bottom of a Web page? http://ryanfait.com/resources/footer-stick-to-bottom-of-page/ 我有一个带有链接的段落,我希望它位于页面底部,所以我把它放在.footer中. 问题是该链接在

我正在使用如下所述的粘性页脚:

> How do you get the footer to stay at the bottom of a Web page?
> http://ryanfait.com/resources/footer-stick-to-bottom-of-page/

我有一个带有链接的段落,我希望它位于页面底部,所以我把它放在.footer中.

问题是该链接在Firefox 3.5.2和Chrome中无法点击,它位于.push后面.它确实在IE7和IE8中工作,但我想这并不多说.

我玩过z-index,但这不起作用.顺便说一句,我需要位置:#page中的相对来定位div中的一些东西.

有没有办法在.footer中在所有浏览器中点击链接?

代码的相关部分:

CSS

html,body {
    height: 100%;
}
#page {
    width: 962px;
    text-align: left;
    min-height: 100%;
    /* sticky footer part */
    height: auto !important;
    height: 100%;
    margin: 0 auto -90px;
    /* end sticky footer */
    position: relative;
}
/* sticky footer part */
.push,.footer {
    height: 90px;
}
.push {
}
.footer {
    background: #181f18 url(../images/background-top.png) no-repeat center bottom;
}

HTML

最佳答案
解决了它,添加了一个位置:相对和z索引做到了:

.push,.footer {
    height: 90px;
    position: relative;
}
.push {
    z-index: 9000;
    position: relative;
}
.footer {
    background: #181f18 url(../images/background-top.png) no-repeat center bottom;
    z-index: 9999;
    position: relative;
}

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读