简体   繁体   English

修改Visual Studio 2013 MVC Web项目模板CSS

[英]Modify Visual Studio 2013 MVC Web Project Template CSS

Does anyone know what CSS class controls the width of the content area of the _Layout.cshtml and how to modify it (make it wider)? 有谁知道哪个CSS类控制_Layout.cshtml内容区域的宽度以及如何对其进行修改(使其更宽)?

I know it says 我知道它说

class="container body-content"

but I can't see how to modify it. 但我看不到如何修改它。 I read it's better to modify the Site.css to override the bootstrap.css instead of modifying it directly. 我读到最好将Site.css修改为覆盖bootstrap.css,而不是直接对其进行修改。

Thanks. 谢谢。

I discovered that the default bootstrap.css is using the @media rule so it is doing different things at different resolutions which is why I was having a hard time tracking what was going on. 我发现默认的bootstrap.css使用@media规则,因此它以不同的分辨率执行不同的操作,这就是为什么我很难跟踪正在发生的事情。 So in my Site.css I override the behavior with my own settings like: 因此,在我的Site.css中,我使用自己的设置覆盖了行为,例如:

@media (min-width: 1920px) {
.container {
    max-width: 1840px;
    height: 800px;
}

and now it is the width I want. 现在是我想要的宽度。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM