引导程序无法与Visual Studio 2017一起正常使用

编程入门 行业动态 更新时间:2024-10-23 11:22:46
本文介绍了引导程序无法与Visual Studio 2017一起正常使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图在Visual Studio 2017中使用引导程序创建轮播. 我使用NuGet软件包管理器安装了jquery和bootstrap. 为了检查其工作原理,我为轮播生成了一个引导代码段.

I am try to create a carousel using bootstrap in visual studio 2017. I installed jquery and bootstrap using NuGet package manager. And to check its working, i generated a bootstrap snippet for carousel.

这是代码:

<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Homepage</title> <link href="Content/bootstrap.min.css" rel="stylesheet" /> </head> <body> <div class="container"> <div class="row"> <div id="my-carousel" class="carousel slide" data-ride="carousel"> <!-- Indicators --> <ol class="carousel-indicators"> <li data-target="#my-carousel" data-slide-to="0" class="active"></li> <li data-target="#my-carousel" data-slide-to="1"></li> <li data-target="#my-carousel" data-slide-to="2"></li> </ol> <!-- Wrapper for slides --> <div class="carousel-inner" role="listbox"> <div class="item active"> <img alt="First slide" src="placehold.it/1200x675&text=First+slide"> </div> <div class="item"> <img alt="Second slide" src="placehold.it/1200x675&text=Second+slide"> </div> <div class="item"> <img alt="Third slide" src="placehold.it/1200x675&text=Third+slide"> </div> </div> <!-- Controls --> <a class="left carousel-control" href="#my-carousel" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> <span class="sr-only">Previous</span> </a> <a class="right carousel-control" href="#my-carousel" role="button" data-slide="next"> <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> <span class="sr-only">Next</span> </a> </div> </div> </div> <script src="Scripts/jquery-3.3.1.min.js"></script> <script src="Scripts/bootstrap.min.js"></script> </body> </html>

以上代码的输出与预期的不同,因为所有图像幻灯片都放置在另一个幻灯片的下方,而不是轮播.

The output of the above code is not as expected, as all image slides are placed one below the other and not as a carousel.

推荐答案

为 Bootstrap 4 Carousel .

您使用的标记适用于3.x.例如,.item现在是.carousel-item.

The markup you're using is for 3.x. For example .item is now .carousel-item.

更多推荐

引导程序无法与Visual Studio 2017一起正常使用

本文发布于:2023-11-14 04:39:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1586239.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:正常使用   程序   Studio   Visual

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!