如果我在我的 asp.net 应用程序中添加相同的 css 文件两次会怎样
我正在开发一个 ASP.NET 应用程序,其中我的母版页有一个名为“styles/xyz.css”的 css 文件 现在我的另一个 aspx 文件也添加了使用母版页的相同 css 文件“styles/xyz.css” 现在我的问题是如何处理这两个相同的 css 文件? 我想知道的是“asp.net 引擎(或 css 渲染引擎)将如何处理这两个文件?” 它会用新的CSS覆盖以前的CSS吗?或者 它会将两个文件加载到内存中吗? 或者 它将把两个 css 文件合并为一个?
因此,我的应用程序中没有引用错误或冲突,但我想了解效率和内存优化..
I am developing an ASP.NET application , in which my master page has one css file named "styles/xyz.css"
now my one other aspx file is aslo adding the same css file "styles/xyz.css" which is using the master page
now my question is how this two same css file will be treated ?
the thing i wanted to know here is "how asp.net engine ( or css rendering engine ) will treat this two file ? "
will it overwrite the previous css with the new one ? or
it will load both the file in the memory ?
or
it will combine both the css file in one ?
as such there is no referencing error or conflict in my application but i would like to know about the efficiency and memory optimization ..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当涉及到覆盖类似的类和 ID 时,最接近正文标记(或相关内容)的引用将优先。
Whichever one is referenced closer to the body tag (or content in question) will take priority when it comes to overriding similiar classes and IDs.
它不会合并它,它会加载它两次。
首先,它会从子页面加载 css,然后再次从母版页加载。
it will not combine it, it will load it twice.
first it will load the css from the child page, then load it again from the masterpage.