首页 > 解决方案 > 使用角度卡片时如何将页脚放置在页面底部的大小

问题描述

我正在使用一张卡片,在卡片之后我放了我的页脚。但是与 CSS 中提到的页脚相比,页脚的尺寸非常大。

图片 -

在此处输入图像描述

代码 -

app.component.html -

<div class="card" id="card-css">
    <div class="card-body">
  //code

    </div>
  </div>

  <hr class="line" color="#f5821f;" />

  <div class="footer text-right" style = "height:50px !important" >
    <label style="color: black">© 2018 ICICI. API Developer</label>
  </div>

app.component.css

html, body {
  height: 100%;
}

.footer {
  position: relative;
   left: 0;
   bottom: 0;
   width: 100%;
   background-color: white; 
   color: black;
   text-align: center; /* .push must be the same height as .footer */
   }

标签: javascripthtmlcssangularbootstrap-4

解决方案


如果我的问题是正确的,那么我认为您希望您的页脚位于页面底部。为此,您只需要更改波纹管 CSS。

position: relative

position: fixed;
margin:10px;

对于文本大小,您可以根据需要添加以下 CSS。

font-size: 25px;

推荐阅读