DotNetNuke 换肤:如何使用\添加 Skin.css?
我刚刚开始 DNN 蒙皮,对 Skin.css 的工作原理感到困惑。我使用的是“传统”皮肤方法,因此我的皮肤文件夹中有 SkinName.htm 文件,每次更改时我都会让 DNN 解析该文件。现在我想添加一些 css...
根据此:(以及我遇到的各种其他参考资料)
我只需要在皮肤文件夹中添加一个 Skin.css 文件,DNN 框架就会自动添加对它的引用。
但我添加了一个 Skin.css,其中包含以下内容:
.Head
{
color: Green;
}
这绝对不会出现在我的最终页面上;用萤火虫检查。没有像 color: Green 这样的东西被应用到我的带有 class="Head" 的元素
有人对为什么我的 Skin.css 可能被忽略有任何建议吗?现在的DNN版本还这样工作吗?有什么明显的我应该看的吗?
I'm just getting started DNN skinning and am confused by how skin.css works. I'm using the "legacy" skinning method, so my skin folder has SkinName.htm file in it, which I get DNN to parse each time I change it. Now I want to add some css...
According to this: (and various other references I've come across)
I should just need to add a skin.css file in my skin folder and the DNN framework should automatically add a reference to it.
But I've added a skin.css, containing the following:
.Head
{
color: Green;
}
which definitely doesn't make it to my final page; checked with firebug. Nothing like color: Green is being applied to my elements with class="Head"
Anybody have any suggestions on why my skin.css might be ignored? Does the current DNN version still work in this way? Anything obvious I should look at?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您所需要的只是皮肤目录中的 Skin.css 文件,引用将自动添加。
但开发皮肤时,如果在目录下没有skin.css文件的情况下先点击“解析皮肤包”,则创建后会被忽略。最简单的解决方案是将所有皮肤文件复制到新的皮肤目录并重新解析皮肤包。
All you need is a skin.css file in your skinning directory the reference will be automatically added.
However, when developing a skin, if you first click "Parse Skin Package" when there is no skin.css file in the directory, it will be ignored after it is created. The easiest solution is to copy all your skin files to a new skin directory and re-parse the skin package.