Twitter bootstrap 旋转木马中的箭头和指示器未显示(来自DB的图像)
我正在使用Twitter bootstrap 旋转木马中的箭头和指示器未显示(来自DB的图像),twitter-bootstrap,razor,twitter-bootstrap-3,carousel,Twitter Bootstrap,Razor,Twitter Bootstrap 3,Carousel,我正在使用MVC5中的Carousel引导滑块和Razor查看引擎以及从数据库调用的图像。如何显示指示器和箭头,以及如何显示全屏图像 Index.cshtml: @model NP1.ViewModels.HomeVM @{ ViewBag.Title = "Home Page"; } <!-- start carousel --> <div> <div class="carousel slide" data-ride="carousel" data-i
MVC5
中的Carousel引导滑块和Razor
查看引擎以及从数据库调用的图像。如何显示指示器和箭头,以及如何显示全屏图像
Index.cshtml:
@model NP1.ViewModels.HomeVM
@{
ViewBag.Title = "Home Page";
}
<!-- start carousel -->
<div>
<div class="carousel slide" data-ride="carousel" data-interval="3000">
<div class="carousel-inner">
@foreach (var item in Model.Carousels)
{
if (item == Model.Carousels.FirstOrDefault())
{
<div class="item active ">
<img style="height:250px; width:100%;" class="img-responsive" src="@Url.Content(item.CarouselImage.ToString())">
<div class="carousel-caption">
<h3>@item.CarouselSubject</h3>
<h4>@item.CarouselInfo</h4>
</div>
</div>
}
else
{
<div class="item">
<img style="height: 250px; width: 100%;" class="img-responsive" src="@Url.Content(item.CarouselImage.ToString())" />
<div class="carousel-caption">
<h3>@item.CarouselSubject</h3>
<h4>@item.CarouselInfo</h4>
</div>
</div>
}
}
</div>
</div>
</div>
@model NP1.ViewModels.HomeVM
@{
ViewBag.Title=“主页”;
}
@foreach(Model.Carousels中的var项)
{
if(item==Model.Carousels.FirstOrDefault())
{
@item.CarouselSubject
@项目1.CarouselInfo
}
其他的
{
@item.CarouselSubject
@项目1.CarouselInfo
}
}
Layout.cshtml:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - My ASP.NET Application</title>@Styles.Render("~/Content/css") @Scripts.Render("~/bundles/modernizr")</head>
<body class="container-fluid" style="width:100% !important;padding:0px;">
<div class="container body-content">@RenderBody()
<footer></footer>
</div>@Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/bootstrap") @RenderSection("scripts", required: false)</body>
</html>
@ViewBag.Title-我的ASP.NETApplication@Styles.Render(“~/Content/css”)@Scripts.Render(“~/bundles/modernizer”)
@RenderBody()
@Scripts.Render(“~/bundles/jquery”)@Scripts.Render(“~/bundles/bootstrap”)@RenderSection(“脚本”,必需:false)