html - Safari 上的页脚随内容滚动,但在 Chrome 上则不会

标签 html css

使用 Safari 浏览器时,页脚会随着内容滚动。但是,当我切换到 chrome 时,它​​不会滚动并位于页面中间。相关代码如下:

<footer>
    <div class="mastfoot">
        <div class="foot_class">
            <a href="--"><p>Facebook</p></a>
            <a href="--"><p>Email</p></a>
            <a href="--"><p>Linkedin</p></a>
            <a href="--"><p>Github</p></a>
            <a href="--"><p></p></a>
            </div>

    </div>
</footer>

html,
body {
    -webkit-perspective: 1000px;
    background: #457fca; /* fallback for old browsers */
    background: -webkit-linear-gradient(to right, #5691c8, #457fca); /* 
    Chrome 10-25, Safari 5.1-6 */
    background-image: url('bg.jpg');
    background-size: cover;
    padding: 0;
    height: 100%;

    color: #fff;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}
.mastfoot {
 color: #999; /* IE8 proofing */
 color: rgba(255, 255, 255, .5);
}

footer {
 position: fixed;
 margin-top: -150px;  /* negative value of footer height */
 height: 150px;
 clear: both;
}

    .foot_class {
    margin-top: 125px;
}
.foot_class a {
    color: #fff;
    border: 1px solid white;
    background: #2F3336;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    font-family: fontawesome;
    position: relative;
    display: inline-block;
    width: 40px;
    height: 40px;
    padding-top: 12px;
    margin: 0 2px;
    transition: all .5s;
}
.foot_class a:hover {
    background: #00b9b7;
}
.foot_class a:hover p {
    border-radius: 30px;
    bottom: 35px;
    visibility: visible;
}
.foot_class a p {
    color: #666;
    position: absolute;
    bottom: 0;
    left: -25px;
    right: -25px;
    padding: 5px 7px;
    z-index: -1;
    font-size: 14px;
    border-radius: 2px;
    background: #fff;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.6, -0.6, 0.2, 1.5);
}
.foot_class a p:before {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #fff;
    position: absolute;
    bottom: -5px;
    left: 40px;
}

我真的不知道为什么会这样。我对网络开发还很陌生,所以我确定我犯了一个愚蠢的错误。如果有帮助,请提供该网站的网址:www.chrisrisley.us。这是我为自己建立的个人网站。

最佳答案

有没有办法查看更多代码?尝试调整页脚的位置。您可以试试看是否有帮助。

footer {
 position: absolute;
 right: 0;
 bottom: 0;
 left: 0;
 margin-top: -150px;  /* negative value of footer height */
 height: 150px;
 clear: both;
}

.mastfoot {
 position: absolute;
 right: 0;
 bottom: 0;
 left: 0;
 color: #999; /* IE8 proofing */
 color: rgba(255, 255, 255, .5);
}

关于html - Safari 上的页脚随内容滚动,但在 Chrome 上则不会,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47040732/

相关文章:

javascript - Phonegap - 相机拍摄的照片总是变成风景

jquery - 合并 Foundation 后动画突然不起作用?

html - 悬停时出现边框

javascript - Jquery 和 JS 适用于 DOM 而不是 onLoad

javascript - 如何: dynamic inline-block elements to start a new line when the container width is reach

css - 如何在 CSS 中使用 3 位颜色代码而不是 6 位颜色代码?

html - CSS:两个 Logo 左右对齐,应通过窗口调整大小自动缩放

ios - 向左滑动返回

javascript - 一种使用 CSS 变换尺度的响应技术

javascript - 我的 Joomla 模板正在使用 JS 加载我的自定义 CSS。有没有办法将唯一的版本标签添加到我的自定义 CSS 中?即 : custom. css?20180101