Site.CSS保留其默认值:
body { padding-top: 50px; padding-bottom: 20px;}/* Set padding to keep content from hitting the edges */.body-content { padding-left: 15px; padding-right: 15px;}/* OverrIDe the default bootstrap behavior where horizontal description Lists will truncate terms that are too long to fit in the left column */.dl-horizontal dt { white-space: normal;}/* Set wIDth on the form input elements since they're 100% wIDe by default */input,select,textarea { max-wIDth: 280px;}
而且我的indes.csHTML非常简单:
@{ VIEwBag.Title = "Home Page";}<div ID="mapa"> <h1>ASP.NET</h1></div><div ID="content"> <div > <nav > <div > <div > <a href="#">WebSitename</a> </div> <ul > <li ><a href="#">Home</a></li> <li><a href="#">Page 1</a></li> <li><a href="#">Page 2</a></li> <li><a href="#">Page 3</a></li> </ul> </div> </nav> </div> </div>
我尝试将margin-left:0和margin-right:0添加到body-content类,但它只是将子页面向左移动并保持其大小.
解决方法 空白是因为默认情况下,通过Visual Studio创建的ASP.NET MVC项目使用 Bootstrap CSS Framework.我建议您学会使用它 – 它将使您的前端开发量更容易.解决你的问题,你会发现任何一方带有“空白”的内容都嵌套在一个包含类容器的div中.删除此类并使用container-fluID将删除空白并使容器成为全屏宽度.
不要试图通过bootstrap覆盖容器上设置的边距,否则会破坏bootstrap在其他地方的样式.
总结以上是内存溢出为你收集整理的html – asp mvc默认应用程序生成删除空格全部内容,希望文章能够帮你解决html – asp mvc默认应用程序生成删除空格所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)