CSS级联顺序-作者与用户 [英] CSS cascading order - author vs user

查看:28
本文介绍了CSS级联顺序-作者与用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以升序排列:

  1. 用户代理声明
  2. 用户常规声明
  3. 编写常规声明
  4. 撰写重要声明
  5. 用户重要声明

CSS规范将作者用户定义为:

CSS spec defines author and user as:

作者.作者根据文档语言的约定为源文档指定样式表.例如,在HTML中,样式表可能包含在文档中或链接了外部.

Author. The author specifies style sheets for a source document according to the conventions of the document language. For instance, in HTML, style sheets may be included in the document or linked externally.

用户:用户可以为特定文档指定样式信息.例如,用户可以指定一个文件包含样式表,或者用户代理可以提供一个界面生成用户样式表(或表现得与之相似).

User: The user may be able to specify style information for a particular document. For example, the user may specify a file that contains a style sheet or the user agent may provide an interface that generates a user style sheet (or behaves as if it did).

..,但是对于我还是网站/应用程序的开发人员来说,我还是不清楚还是用户还是作者?两者之间有什么区别?

.. but its still not clear to me if I, the developer of the website/app, is the user or the author? Whats the difference between the two?

推荐答案

作者

该应用程序的原始CSS代码的开发人员.假设StackOverflow网站的前端开发人员是此处的作者.

The developer of the original CSS code for that application. Let's say the Front-end developer of StackOverflow website is the Author here.

对作者代码进行的任何更改都会影响以下应用程序的样式大家.

Any changes made on Author code will effect the application style for everyone.

用户

您要为您查看的页面设置自定义样式.例如::如果您需要更改Stackoverflow网站的背景颜色,则可以使用

You want to have custom style for the pages that you view. Eg: If you need to change the background color of Stackoverflow website, you can use Stylish extension to append your custom style rules. Now you are the user here.

您可以在 样式侧面板 显示系统应用的样式以及用户定义的自定义CSS.

You can filter the user styles in the Style Side Panel which shows the system applied styles as well as user defined custom CSS.

对此代码所做的任何更改只会影响您的浏览器.

Any changes made on this code will affect only your browser.

这篇关于CSS级联顺序-作者与用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆