在bootstrap.css
文件的部分:
@media (min-width: 768px) {
.dl-horizontal dt {
float: left;
width: 160px;
overflow: hidden;
clear: left;
text-align: right;
text-overflow: ellipsis;
white-space: nowrap;
}
.dl-horizontal dd {
margin-left: 180px;
}
我将width: 160px;
更改为width: 260px;
,将margin-left: 180px;
更改为margin-left: 280px;
。
我保存,重新加载,稍后重新启动Visual Studio。在我的Chrome网站中,我检查了加载的样式:
.dl-horizontal dt {
float: left;
width: 160px; //STILL 160px !
overflow: hidden;
clear: left;
text-align: right;
text-overflow: ellipsis;
white-space: nowrap;
}
所以我通过Visual Studio检查了bootstrap.min.css
,我看到我对bootstrap.css
所做的更改未应用于bootstrap.min.css
,因此我将其手动应用于缩小的文件和Chrome正确加载它们。
如何让VS2013更新这个缩小的文件?
编辑:我必须说在VS2013(今天)之后在boostrap.min.css
进行更改后更新了boostrap.css
。在这些变化之后,它没有这样做。
using System.Web;
using System.Web.Optimization;
namespace WebApplication2 {
public class BundleConfig {
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles) {
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.validate*"));
// Use the development version of Modernizr to develop with and learn from. Then, when you're
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js",
"~/Scripts/respond.js"));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/site.css"));
// Set EnableOptimizations to false for debugging. For more information,
// visit http://go.microsoft.com/fwlink/?LinkId=301862
BundleTable.EnableOptimizations = true;
}
}
}
答案 0 :(得分:1)
min文件在重建后更新。强制重建以更新min.css文件。如果你删除bootstrap.min.css然后重建项目,我会很好奇。