图像渲染部分在mvc布局页面中

时间:2017-02-28 23:40:41

标签: html css asp.net-mvc-5

我在mvc页面中设置背景图片。由于某种原因,看不到整个图像。我已将高度设置为100%。仍然没有得到整页。屏幕上的图像不会拉伸。你能知道问题是什么吗?

请参阅下面的屏幕截图以了解问题

enter image description here

布局页面

<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title - My Kendo UI MVC Application</title>

    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/2017.1.118/kendo.common-bootstrap.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/2017.1.118/kendo.mobile.all.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/2017.1.118/kendo.dataviz.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/2017.1.118/kendo.bootstrap.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/2017.1.118/kendo.dataviz.bootstrap.min.css")" rel="stylesheet" type="text/css" />
    <link href="~/Content/bootstrap.css" rel="stylesheet" />
    <link href="~/Content/app.css" rel="stylesheet" />

    <script src="~/Scripts/jquery-3.1.1.min.js"></script>
    <script src="~/Scripts/bootstrap.min.js"></script>

    <script src="@Url.Content("~/Scripts/kendo/2017.1.118/jquery.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo/2017.1.118/angular.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo/2017.1.118/jszip.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo/2017.1.118/kendo.all.min.js")"></script>

</head>
<body >
    <header>
        <nav class="navbar navbar-default">
            <div class="container-fluid">
                <!-- Brand and toggle get grouped for better mobile display -->
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a href="#"><img src="~/Images/NGSR-logo.jpg" /> </a>
                </div>

                <!-- Collect the nav links, forms, and other content for toggling -->
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

                    <ul class="nav navbar-nav navbar-right text-center">
                        <li><a href="#"><span class="glyphicon glyphicon glyphicon-file" aria-hidden="true"></span><p>Requests</p></a></li>
                        <li><a href="#"><span class="glyphicon glyphicon-tasks" aria-hidden="true"></span><p>Activities</p></a></li>
                        <li><a href="#"><span class="glyphicon glyphicon glyphicon-file" aria-hidden="true"></span><p>Reports</p></a></li>
                        <li><a href="#"><span class="glyphicon glyphicon glyphicon-file" aria-hidden="true"></span><p>Admin</p></a></li>


                        <li class="dropdown hideli">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> <span class="caret"></span><p>Country</p></a>
                            <ul class="dropdown-menu">
                                <li><a href="#">DE</a></li>
                                <li><a href="#">GB</a></li>
                                <li><a href="#">FR</a></li>

                            </ul>

                        </li>

                        <li><a href="#"><span class="glyphicon glyphicon-save" aria-hidden="true"></span><p>Save View</p></a></li>
                    </ul>
                </div><!-- /.navbar-collapse -->
            </div><!-- /.container-fluid -->
        </nav>



    </header>


    <div id="body">

            @RenderBody()

    </div>
    <footer></footer>
</body>

app.css

#body {
    font-family:  Helvetica, sans-serif, sans-serif;
    font-size:13px;
    border-top:none;



    /*clear: both;
    padding-bottom: 35px;*/

    background-image: url('../Images/iNeed__waterfall_BG.jpg');
    background-repeat:no-repeat;
    background-size:cover;
    height: 500px;

}

.navbar {
    margin-bottom: 0px;
    padding: 0;
    background-color:white;
}

.navbar-header img{
    width: auto;
    height: auto;
    padding-top:15px;
}

nav navbar-nav navbar-right{
    text-align:center;
}

.hideli {
    padding-right: 200px;
}

如果您在上面的代码中看到

0 个答案:

没有答案