【发布时间】:2011-12-02 23:17:15
【问题描述】:
我有一个剃须刀主布局_Master.cshtml,其中包含Master.css。
我还有一个Home.cshtml 和_Master.cshtml 是它的布局。
在家里我有一个视图Event.cshtml - 这个视图没有任何母版页设置。
@{
Layout = null;
}
<style>
.boxStyle{...}
</style>
<div class="boxStyle">
...
</div>
这行得通。但我想将.boxStyle 移动到Master.css
当我把它移到那里时,它就不再起作用了。
但是如果我将下面的代码添加到_Master.cshtml 然后就可以了。但我需要它在 css 文件中。
<style>
.boxStyle{...}
</style>
我在这里做错了什么?
【问题讨论】: