ASP.NET 主题中每页一个 CSS
有人知道该怎么做吗?
Theme A
style_for_x.aspx.css
style_for_y.aspx.css
Theme B
style_for_x.aspx.css
style_for_y.aspx.css
或者甚至更好:
Theme A
style_for_all_pages.css
style_for_x.aspx.css
style_for_y.aspx.css
Theme B
style_for_all_pages.css
style_for_x.aspx.css
style_for_y.aspx.css
Does anybody know how to do this?
Theme A
style_for_x.aspx.css
style_for_y.aspx.css
Theme B
style_for_x.aspx.css
style_for_y.aspx.css
Or even better:
Theme A
style_for_all_pages.css
style_for_x.aspx.css
style_for_y.aspx.css
Theme B
style_for_all_pages.css
style_for_x.aspx.css
style_for_y.aspx.css
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ASP.NET 主题的问题是所有现有的 CSS 文件都包含在每个页面上。
也许您应该将 CSS 文件移动到不同的位置(例如“~/css/ThemeA”),并根据当前页面的名称和当前选择的主题手动包含它们(或包含在所有页面的公共基类中)。
The problem with ASP.NET themes is that all existing CSS files are included on every page.
Maybe you should move your CSS files to a different location (e.g. "~/css/ThemeA") and include them manually (or in a common base class for all of your pages) depending on the current page's name and the currently selected theme.