Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/90.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 使用Bootstrap 4将版权页脚定位到Angular/C#应用程序的底部_Html_Css_Twitter Bootstrap_Razor_Bootstrap 4 - Fatal编程技术网

Html 使用Bootstrap 4将版权页脚定位到Angular/C#应用程序的底部

Html 使用Bootstrap 4将版权页脚定位到Angular/C#应用程序的底部,html,css,twitter-bootstrap,razor,bootstrap-4,Html,Css,Twitter Bootstrap,Razor,Bootstrap 4,我正在努力使用bootstrap中的粘性页脚包装器,以便页脚保持在页面底部。但是,它只是在页面内容结束后立即出现。这是我的Index.cshtml @{ Layout = null; } <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>XXXX</title> <base href="/">

我正在努力使用bootstrap中的粘性页脚包装器,以便页脚保持在页面底部。但是,它只是在页面内容结束后立即出现。这是我的
Index.cshtml

@{
    Layout = null;
}

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>XXXX</title>
    <base href="/">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" type="image/x-icon" href="favicon.ico">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <link href="/Content/ionicons.min.css" rel="stylesheet" />
    <script src="https://npmcdn.com/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
</head>
<body>

    <div class="d-flex flex-column sticky-footer-wrapper">

            <app-root></app-root>

        <footer class="container-fluid w-100 bg-info text-light py-3">
            <div id="copyright">
                <a target="_blank" href="https://www.company.net/"><img src="/Content/img/xxxlogo_footer.png" alt="xxx Footer Logo" /></a>
                <span>xx.com is the global source of information about and access to services provided by the xxx companies.</span>
                <span class="pull-right copyright">&copy; 2019 xxxgroup Inc.</span>
            </div>
        </footer>
    </div>


    <script type="text/javascript" src="~/Scripts/client/runtime.js"></script>
    <script type="text/javascript" src="~/Scripts/client/polyfills.js"></script>
    @if (HttpContext.Current.IsDebuggingEnabled)
    {
        <script type="text/javascript" src="~/Scripts/client/styles.js"></script>
        <script type="text/javascript" src="~/Scripts/client/vendor.js"></script>
    }
    <script type="text/javascript" src="~/Scripts/client/main.js"></script>
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
</html>
@{
布局=空;
}
XXXX
xx.com是xxx公司提供的信息和服务的全球来源。
&抄袭;2019年XXX集团公司。
@if(HttpContext.Current.IsDebuggingEnabled)
{
}
对于组件模板,它不起作用。我试图通过将内容包装在容器中,在底部添加间距/填充

<div class="container mb-3 pb-3" ></div>


但它仍然不起作用。请指导。

在接受评论后编辑

vh-100
添加到外部div,使其最初拉伸到视口大小,然后在第一个元素中添加
mb auto
,以便将
页脚推到底部

这里有一个例子


xx.com是xxx公司提供的信息和服务的全球来源。
&抄袭;2019年XXX集团公司。

为什么要将整个脚本和css放在index.cshtml中,而不是layout.cshtml中?Tony,老实说,我按照一些示例教程来设置项目。那么,您是否建议应用layout.cshtml中的页脚?这比我的要好,但是当我向上或向下滚动页面时,页脚会保持固定,并且在内容顶部始终可见。与页眉不同,在这种情况下,向下滚动页面,页眉不固定。我想了解一下这一页的行为。非常感谢。节省了我很多时间