【问题标题】:How to remove the bottom space of the button?如何去除按钮的底部空间?
【发布时间】:2018-11-08 19:52:52
【问题描述】:

我正在开发这个新网站以取得这样的结果:

这是我目前的状态:

github 仓库链接:https://github.com/rittamdebnath/papercutlabs_new

谁能帮帮我?

【问题讨论】:

  • 从您的 Github 链接中使用此按钮查找代码部分非常耗时。在此处添加所有与按钮相关的代码 sn-ps(css、html)。
  • tyr 这个section.payments .payment-card .services p.content {min-height:156px}
  • 按钮使用绝对位置

标签: html css twitter-bootstrap user-interface web


【解决方案1】:

请添加此 CSS:

.section.payments .payment-card {
    padding-bottom: 60px;
}
section.payments a.btn {
    position: absolute;
    bottom: 0;
    left:0;
    right: 0;
}

【讨论】:

    【解决方案2】:

    试试看对你有帮助

    <style>
    section.payments .payment-card .services p.content {
    min-height: 158px;
    }
    </style>
    

    【讨论】:

      【解决方案3】:
      section.payments .payment-card .services p.content{    min-height: 156px;}
      

      添加这个“最小高度:156px;”上一班

      【讨论】:

        【解决方案4】:

        删除按钮下方的空间。请使用以下代码:

        section.payments .payment-card {
            padding-bottom: 60px;
        }
        section.payments a.btn {
            position: absolute;
            bottom: 0;
            left: 0;
        }
        

        【讨论】:

          【解决方案5】:

          您可以通过简单地将下面的 css 添加到您的代码中来做同样的事情:-

          section.payments .payment-card {

          display: flex;
          flex-direction: column;
          width: 100%;
          

          }

          section.payments a.btn {

          align-self: flex-end;
          margin-top: auto;
          

          }

          ** 截图:-** enter image description here

          【讨论】:

            【解决方案6】:

            最好的方法是使用按钮的绝对位置,它适用于每个屏幕上的每个条件,正如一些用户在上面回答的那样。使用该位置解决方案。您也可以使用 flex 解决方案,但会遇到一些浏览器兼容性问题。

            【讨论】:

              猜你喜欢
              • 1970-01-01
              • 1970-01-01
              • 2022-01-03
              • 2010-11-03
              • 2020-12-05
              • 1970-01-01
              • 1970-01-01
              • 2018-02-07
              • 2022-10-20
              相关资源
              最近更新 更多