Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/288.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
C# 主页上的引导完整图像_C#_Css_Twitter Bootstrap_Asp.net Mvc 4_Visual Studio 2012 - Fatal编程技术网

C# 主页上的引导完整图像

C# 主页上的引导完整图像,c#,css,twitter-bootstrap,asp.net-mvc-4,visual-studio-2012,C#,Css,Twitter Bootstrap,Asp.net Mvc 4,Visual Studio 2012,我有这个: _布局: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>@ViewBag.Title - LolaBikeMen</title> @Styles.Ren

我有这个:

_布局:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - LolaBikeMen</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")

</head>
<body>



    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    @*<span class="icon-bar"></span>
                    <span class="icon-bar"></span>*@
                    <span class="icon-bar"></span>
                </button>



                @Html.ActionLink("LolaBikeMen", "Index", "Home", null, new { @class = "navbar-brand" })
            </div>
            <div class="navbar-collapse collapse">
                <br />


                    <ul class="nav navbar-nav">
                        @*<li>@Html.ActionLink("Home", "Index", "Home")</li>*@
                        <li class="nav ">@Html.ActionLink("WHO", "About", "Home")</li>
                        <li class="nav ">@Html.ActionLink("WHAT", "Index", "Student")</li>
                        <li class="nav ">@Html.ActionLink("AGENDA", "Index", "Course")</li>
                        <li class="nav">@Html.ActionLink("PHILOSPY", "Index", "Instructor")</li>
                        <li class="nav">@Html.ActionLink("BUCKET-LIST", "Index", "Department")</li>
                        <li class="nav">@Html.ActionLink("LolaRiders", "Index", "LolaBiker")</li>
                        <li class="nav">@Html.ActionLink("bycicle", "Index", "Bycicle")</li>

                       @*<li class="nav"> @Html.Partial("_LoginPartial")</li>*@

                    </ul>



            </div>


        </div>
    </div>
    @*<li class="nav"><img src="~/Images/LolabikesCoffeeLogo3.jpg"> </li>*@
    <div class="container">
        @RenderBody()

        @*<footer>
            <p>&copy; @DateTime.Now.Year - LolaBikeMen</p>
        </footer>*@
    </div>

    @*<div class="fill">


    </div>*@

    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/Cyborg-bootstrap.min")
    @RenderSection("scripts", required: false)
</body>
</html>
和INdex.cshtml(主页):

但是Index.cshtml页面会是什么样子呢

像这样:

<div class="background">

</div>
/* Move down content because we have a fixed navbar that is 50px tall */
.container{
    /*background-color:MenuText;*/
}
.container2{

    width:100%;
    height:100%;
}

body {


    /*padding-top: 90px;
    padding-bottom: 20px;*/

}

/*html {
            background: url(~/Images/Large.JPG) no-repeat center center fixed;
            -webkit-background-size: cover;
            -moz-background-size: cover;
            -o-background-size: cover;
            background-size: cover;
        }*/

.wrapper {
  background-image: url(../Images/Large.JPG);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  width: 100%;
  height: 100%;

}
.wide {
  width:100%;
  height:1000px;
  background-image:url('../Images/Large.JPG');
  background-size:cover;
}

.wide img {
  width:100%;
}

navbar{
    color:white;
}

.table-striped>tr>td:nth-child(odd)>td, 
.table-striped>tr>td:nth-child(odd)>td {
    background-color:white;
}

.table.table-condensed tr th {
   border-top: 1px solid white; 
}

.table.table-condensed tr th {
   border-bottom: 1px solid white; 
}

.a:hover, a:focus {
        color:floralwhite;
        text-decoration: underline;
    }

a {
    color:floralwhite;
    text-decoration: none;
}

.table.table-condensed tr td {
   border-bottom: 1px solid white; /* Change the color you want to set */
}

.wrapper {
    width: 100%;
    background-color: lightcyan;
}

img {
    background-image: url('../Images/Large.JPG');
    background-repeat: no-repeat;
    background-position:top;
    background-size:cover;
    width: 100%;
    height: 100%;
}

/**/
#map {
        height: 100%;
        width: 100%;
}

#map img {
        max-width: 100%;
}

html, body {
        height: 100%;
        width: 100%;
}

.fullscreen,
.content-a {
    width:100%;
    min-height:100%;
}


.background {
    background-image: url('../Images/Large.JPG');
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: 100%;

}

.fill {
    top: -30px;
    left: 0;
    right: 0;
    bottom: 0;
    position:relative;
    /*overflow-x;*/
    width:100%;
    height:100%;
}

html,body{height:100%;}
.carousel,.item,.active{height:100%;}
.carousel-inner{height:100%;}
.fill{width:100%;height:100%;background-position:center;background-size:cover;}

.navbar {
        margin-bottom: 0;
}

/* Demo */
#map { background:black; }




/**/

/* Wrapping element 
/* Set some basic padding to keep content from hitting the edges */
.body-content {
    padding-left: 15px;
    padding-right: 15px;


}

/* Override the default bootstrap behavior where horizontal description lists 
   will truncate terms that are too long to fit in the left column 
*/
.dl-horizontal dt {
    white-space: normal;
}

/* Set widths on the form inputs since otherwise they're 100% wide */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="select"] {
    max-width: 280px;
}

/* Responsive: Portrait tablets and up */
@media screen and (min-width: 768px) {
    .jumbotron {
        margin-top: 20px;
    }
    .body-content {
        padding: 0;

    }
}
我得到这个信息:

警告87验证(WE):“-webkit背景大小”不是有效的特定于供应商的属性,或者可能已被弃用。G:\Mijn Documents\My websites\Lolabikes\C#\ContosoUniversity\Content\full-width-pics.css 14 5 Lolabike

好吧,我现在有了这样的:

<div class="background">

</div>
/* Move down content because we have a fixed navbar that is 50px tall */
.container{
    /*background-color:MenuText;*/
}
.container2{

    width:100%;
    height:100%;
}

body {


    /*padding-top: 90px;
    padding-bottom: 20px;*/

}

/*html {
            background: url(~/Images/Large.JPG) no-repeat center center fixed;
            -webkit-background-size: cover;
            -moz-background-size: cover;
            -o-background-size: cover;
            background-size: cover;
        }*/

.wrapper {
  background-image: url(../Images/Large.JPG);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  width: 100%;
  height: 100%;

}
.wide {
  width:100%;
  height:1000px;
  background-image:url('../Images/Large.JPG');
  background-size:cover;
}

.wide img {
  width:100%;
}

navbar{
    color:white;
}

.table-striped>tr>td:nth-child(odd)>td, 
.table-striped>tr>td:nth-child(odd)>td {
    background-color:white;
}

.table.table-condensed tr th {
   border-top: 1px solid white; 
}

.table.table-condensed tr th {
   border-bottom: 1px solid white; 
}

.a:hover, a:focus {
        color:floralwhite;
        text-decoration: underline;
    }

a {
    color:floralwhite;
    text-decoration: none;
}

.table.table-condensed tr td {
   border-bottom: 1px solid white; /* Change the color you want to set */
}

.wrapper {
    width: 100%;
    background-color: lightcyan;
}

img {
    background-image: url('../Images/Large.JPG');
    background-repeat: no-repeat;
    background-position:top;
    background-size:cover;
    width: 100%;
    height: 100%;
}

/**/
#map {
        height: 100%;
        width: 100%;
}

#map img {
        max-width: 100%;
}

html, body {
        height: 100%;
        width: 100%;
}

.fullscreen,
.content-a {
    width:100%;
    min-height:100%;
}


.background {
    background-image: url('../Images/Large.JPG');
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: 100%;

}

.fill {
    top: -30px;
    left: 0;
    right: 0;
    bottom: 0;
    position:relative;
    /*overflow-x;*/
    width:100%;
    height:100%;
}

html,body{height:100%;}
.carousel,.item,.active{height:100%;}
.carousel-inner{height:100%;}
.fill{width:100%;height:100%;background-position:center;background-size:cover;}

.navbar {
        margin-bottom: 0;
}

/* Demo */
#map { background:black; }




/**/

/* Wrapping element 
/* Set some basic padding to keep content from hitting the edges */
.body-content {
    padding-left: 15px;
    padding-right: 15px;


}

/* Override the default bootstrap behavior where horizontal description lists 
   will truncate terms that are too long to fit in the left column 
*/
.dl-horizontal dt {
    white-space: normal;
}

/* Set widths on the form inputs since otherwise they're 100% wide */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="select"] {
    max-width: 280px;
}

/* Responsive: Portrait tablets and up */
@media screen and (min-width: 768px) {
    .jumbotron {
        margin-top: 20px;
    }
    .body-content {
        padding: 0;

    }
}
Site.css:

body {

    background-image: url('../Images/Large.JPG');
    background-repeat: no-repeat;
    background-attachment: fixed;background-size: 100%;
    /*padding-top: 90px;
    padding-bottom: 20px;*/

}
和index.cshtml:

<div class="container fill">
    <div id="map">

    </div>
</div>
<div class="background"></div>
在index.cshtml中:

<div class="container fill">
    <div id="map">

    </div>
</div>
<div class="background"></div>
但是图像根本不显示。

使用此选项-

  background: url(../Images/Large.JPG) no-repeat center center fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
编辑

这里有一个替代方案-

body { 
    background-image: url(../Images/Large.JPG);
    background-repeat: no-repeat;
    background-attachment: fixed;background-size: 100%;
}

你好,中和谢谢你的answare,你看过我的编辑吗??有人帮忙吗?谢谢,有人吗?这怎么可能呢?我不确定你到底面临着什么样的错误,因为这些解决方案对我很有效。试着回答一些问题,看看你是否能获得50的声誉,这样你就可以在这个问题上增加一笔奖金来获得更多的关注。等等。首先尝试这样的绝对链接,看看它是否有效,然后尝试相对链接-
  background: url(../Images/Large.JPG) no-repeat center center fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
body { 
    background-image: url(../Images/Large.JPG);
    background-repeat: no-repeat;
    background-attachment: fixed;background-size: 100%;
}