首页 > 解决方案 > 文本结束后如何对齐底部页脚元素

问题描述

这可能是非常简单的解决方案,但我似乎无法修复或找到它几个小时。我怎样才能让我的透明页脚块在文本之后粘在页面底部。我知道听起来很容易,但看不到让它发挥作用?

任何建议将不胜感激,再次感谢斯图尔特

    body {
    background-color: #828282;
    overflow-x: hidden;
    margin: 0px;
}
    .footer {
    position: absolute;
    bottom: 0px;
    width: 100%;
    height: 180px;
    background-color: rgba(0, 0, 0, 0.2);
}
    .text {
    position: absolute;
    left: 50%;
    transform:translateX(-50%); /* center */
}
<div class="text" style="min-width:400px;max-width:700px;">
<h1>TERMS OF USE FOR ALL USERS</h1>

<br><br>

<b>BY USING OUR WEBSITE YOU AGREE TO THESE TERMS – PLEASE READ THEM CAREFULLY. Introduction: These Terms of Use for all Users govern your use of Venus and your agreement with us. Interpretation: In the Terms of Service:</b>

<br><br>

To reflect changes in laws and regulatory requirements which apply to Venus and the services, features and programs of Venus where such changes require Venus to change its terms and conditions in a manner which does not allow us to give reasonable notice to you; and to address an unforeseen and imminent danger related to defending Venus, Fans or Creators from fraud, malware, spam, data breaches or other cybersecurity risks. We may also make other changes to any part of the Terms of Service, and we will give you reasonable notice of such changes by email or through Venus, and you may contact us to end your agreement with us before the changes take effect. Once any updated Terms of Service are in effect, you will be bound by them if you continue to use Venus.

<br><br>

To reflect changes in laws and regulatory requirements which apply to Venus and the services, features and programs of Venus where such changes require Venus to change its terms and conditions in a manner which does not allow us to give reasonable notice to you; and to address an unforeseen and imminent danger related to defending Venus, Fans or Creators from fraud, malware, spam, data breaches or other cybersecurity risks. We may also make other changes to any part of the Terms of Service, and we will give you reasonable notice of such changes by email or through Venus, and you may contact us to end your agreement with us before the changes take effect. Once any updated Terms of Service are in effect, you will be bound by them if you continue to use Venus.

<br><br>

To reflect changes in laws and regulatory requirements which apply to Venus and the services, features and programs of Venus where such changes require Venus to change its terms and conditions in a manner which does not allow us to give reasonable notice to you; and to address an unforeseen and imminent danger related to defending Venus, Fans or Creators from fraud, malware, spam, data breaches or other cybersecurity risks. We may also make other changes to any part of the Terms of Service, and we will give you reasonable notice of such changes by email or through Venus, and you may contact us to end your agreement with us before the changes take effect. Once any updated Terms of Service are in effect, you will be bound by them if you continue to use Venus.

</div>

<div class="footer"></div>

标签: htmlcsspositionalignmentfooter

解决方案


推荐阅读