在运行时期间因css差异而感到困惑

时间:2016-10-19 20:58:50

标签: html css asp.net-mvc

当应用程序未运行时,我在.css文件中有以下内容:

   #tabsuseradmin .ui-tabs-panel {
        height: 500px;
        overflow: auto;
        margin-right: 10px;
    }

但在运行时,在浏览器开发人员中,相同的样式如下:

 #tabsuseradmin .ui-tabs-panel {
        height: 900px;
        overflow: auto;
        margin-right: 10px;
    }

我搜索了#34; 900px"在我的整个Visual Studio项目中,并没有在height属性的任何地方看到它。我坚持这个并且不知道发生了什么导致它变成900px。我该怎么办?

加载我的CSS文件的顺序:

<link href="/Content/bootstrap.min.css" rel="stylesheet" />
<link href="/Content/bootstrap-theme.min.css" rel="stylesheet" />
<link href="/content/themes/base/jquery-ui.css" type="text/css" rel="stylesheet">
<link href="/content/docsupport/style.css" type="text/css" rel="stylesheet">
<link href="/content/uielements.css" type="text/css" rel="stylesheet">
<link href="/content/headerfooter.css" type="text/css" rel="stylesheet">

uielements.css包含相关样式,headerfooter.css不包含在其上方的css中覆盖的任何内容(我通过完全删除它来测试)。

谢谢。

1 个答案:

答案 0 :(得分:1)

在加载文件后,将css文件加载到head标记内,创建一个样式标记,其中包含要在加载css文件后立即优先使用的规则。这将允许您的规则覆盖css库文件中设置的预先存在的规则。

相关问题