c# - ASP.Net 中的外观不一致
问题描述
我的 ASP.NET MVC 应用程序中的一个网页出现问题。我在 Webstorm 中有 HTML,当我从那里打开它时,它看起来像预期的那样。然后,当我复制到 Visual Studio 中的视图时,所有表单控件都一团糟。即使我直接将 Webstorm 中的所有内容复制到 _layout.cshtml 中,只留下script
和style
链接(和RenderBody();
)它仍然完全关闭。
表单本身只是从 getbootstrap.com 复制的,所以应该没问题。我不知道问题可能是什么,我希望有人有想法。
链接以便您可以看到问题:https ://imgur.com/a/bxFrr3P
来自 Webstorm 的标记:
<div id="wrapper" >
<div id="content-wrapper" class="d-flex flex-column ">
<!-- Main Content -->
<div id="content" style="width: 100%;">
<hr>
<div class="container-fluid">
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">Page Title</h1>
</div>
<div class="col-xl col-md mb-4 " >
<div class="card shadow h-100 py-2 card-background" >
<div class="card-body" style="padding: 0px;">
<div class="box-part text-center mt-2 mr-2 mb-2 ml-2 m-3">
<form>
<div class="form-row">
<div class="form-group col-md-6">
<label for="inputEmail4">Email</label>
<input type="email" class="form-control" id="inputEmail4">
</div>
<div class="form-group col-md-6">
<label for="inputPassword4">Password</label>
<input type="password" class="form-control" id="inputPassword4">
</div>
</div>
<div class="form-group">
<label for="inputAddress">Address</label>
<input type="text" class="form-control" id="inputAddress" placeholder="1234 Main St">
</div>
<div class="form-group">
<label for="inputAddress2">Address 2</label>
<input type="text" class="form-control" id="inputAddress2" placeholder="Apartment, studio, or floor">
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="inputCity">City</label>
<input type="text" class="form-control" id="inputCity">
</div>
<div class="form-group col-md-4">
<label for="inputState">State</label>
<select id="inputState" class="form-control">
<option selected>Choose...</option>
<option>...</option>
</select>
</div>
<div class="form-group col-md-2">
<label for="inputZip">Zip</label>
<input type="text" class="form-control" id="inputZip">
</div>
</div>
<div class="form-group">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="gridCheck">
<label class="form-check-label" for="gridCheck">
Check me out
</label>
</div>
</div>
<button type="submit" class="btn btn-primary">Sign in</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
解决方案
听起来引导程序没有加载。我会重新安装引导程序和/或检查您的包引用。
推荐阅读
- javascript - 由于 JavaScript 无休止的垃圾收集,IE 冻结
- c# - 是否可以在 C# 中创建非固定大小的数组?
- google-bigquery - 复制仅覆盖源表中的分区的分区 bigquery 表
- python - 使用 zip 命令从列表列表中获取所有列表的最后一个元素
- python - DataFrame 切片分配不一致
- c++ - 无法在另一个公共函数中调用公共函数
- sql - SQL Server:查找 1 行的多个索引(并找到这些索引)
- javascript - $_files 数组在使用 javascript 提交时为空
- vue.js - vue-material 和 vee-validate 一起工作
- javascript - 如何从 Java POJO 模型类生成 javascript