简体   繁体   English

将CSS作为主题的一部分的利弊

[英]Pros and cons of having CSS as part of a theme

使用CSS作为主题的一部分而不是在网页的<head>部分中手动提供<link>标记有哪些优点/缺点?

In ASP.NET, using a theme makes it easier to integrate your CSS styles with the Localization, Accessibility, and Navigation features of that development platform. 在ASP.NET中,使用主题可以更轻松地将CSS样式与该开发平台的本地化,可访问性和导航功能集成在一起。

Using your own manual CSS file (referenced from the HTML with a <style> or <link> tag) means that you have to maintain the file yourself, potentially including any browser-specific CSS code. 使用您自己的手动CSS文件(使用<style><link>标记从HTML引用)意味着您必须自己维护文件,可能包括任何特定于浏览器的CSS代码。 However, going this route will probably afford you a higher degree of portability if, for instance, you decided to switch to another platform (eg. LAMP). 但是,例如,如果您决定切换到另一个平台(例如LAMP),那么走这条路线可能会为您提供更高程度的可移植性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM