我刚刚将我的Visual Studio 2017 ASP.NET MVC 5应用程序从Bootstrap v3更新到v4.我发现当我使用脚手架添加新的编辑局部视图时,它仍然使用表单的Bootstrap v3 CSS类名.有没有办法更新脚手架使用BS v4?
编辑
我正在谈论的内容似乎有些混乱.在Visual Studio 2017中,在MVC项目的"解决方案资源管理器"中,右键单击"视图"文件夹>"添加">"查看...">"MVC 5视图">"单击添加".这将打开"添加视图"对话框.我键入我的视图名称,选择编辑模板,然后选择,Views folder > Add > View... > MVC 5 View > Click Add作为Model类.Visual Studio生成此标记.这个过程叫做脚手架.
@model Demo.ViewModels.LoginVm
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div class="form-horizontal">
<h4>LoginVm</h4>
<hr />
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
<div class="form-group">
@Html.LabelFor(model => model.UserName, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.UserName, new { htmlAttributes = new { @class = "form-control" } }) …Run Code Online (Sandbox Code Playgroud) asp.net-mvc asp.net-mvc-scaffolding asp.net-mvc-5 bootstrap-4 visual-studio-2017
我想在悬停时翻转半圆。
.main {
border: 2px solid green;
border-radius: 190px;
height: 200px;
width: 200px;
}
.btm {
border-bottom-left-radius: 190px;
border-bottom-right-radius: 190px;
background-color: red;
height: 100px;
}Run Code Online (Sandbox Code Playgroud)
<div class="main">
<div style="height: 100px;">
</div>
<div class="btm">
</div>
</div> Run Code Online (Sandbox Code Playgroud)
上面的代码圆的底部是红色,我想要的只是我想在悬停时使圆的顶部为红色。
任何帮助将不胜感激。