css级联样式表_CSS –级联样式表| 第2部分

css级联样式表

CSS的历史 (History of CSS)

The concept of style sheet is a pioneer and the World Wide Web: the first web browser (WorldWideWeb, later renamed “Nexus”) allows you to format documents using what is TODAY ‘hui considered a “user stylesheet”. Similarly, the Viola browser in 1992 and Harmony in 1993 to use a similar mechanism to determine the rendering of fonts, colors or text alignment.

样式表的概念是万维网的先驱,它是第一个万维网浏览器(WorldWideWeb,后来更名为“ Nexus”),您可以使用今天被认为是“用户样式表”的格式来格式化文档。 同样,1992年的Viola浏览器和1993年的Harmony使用类似的机制来确定字体,颜色或文本对齐方式的呈现。

It is however not determined by the style author. The first implementations HTML does not include additional disclosures, there is increasing pressure so that browsers allow authors to determine for themselves the formatting of the website, in a step after publication printed electronics. In this context, in 1994-1995, the all-new Netscape introduced the first presentation of HTML elements on the initiative of Marc Andreessen, while concurrently the first proposals show delivery formats external styles: the “stylesheet proposition” Pei Wei (Viola creator), “Stylesheets for HTML” Robert Raisch (O’Reilly), and finally the “HTML Cascading Style Sheets (CHSS) to Håkon Wium Lie. The emergence of CSS responds to a desire to “offer an alternative to HTML evolution of a language to structure a presentation language”.

但是,它不是由样式作者确定的。 HTML的第一个实现不包括其他公开内容,压力越来越大,浏览器允许作者在出版印刷电子产品后的一个步骤中自行确定网站的格式。 在这种情况下,1994年至1995年,全新的Netscape在Marc Andreessen的倡导下首次引入了HTML元素,同时,第一批提案还展示了外部格式的传递格式:“样式表主张” Pei Wei(中提琴创作者) ,“ HTML样式表” Robert Raisch(O'Reilly),最后是HåkonWium Lie的“ HTML级联样式表(CHSS)”。 CSS的出现响应了“提供一种替代语言HTML演变以构建表示语言”的愿望。

A third way of development is also open at the same time: the transformation language DSSSL SGML documents, developed by James Clark, suggests the possibility of a format style that is not merely descriptive, and approximates a true programming language. This track is followed by Netscape, which provides the W3C in 1996 to “JavaScript-Based Style Sheets (JSSS), implemented by Netscape Navigator 4 in 1997.

同时也开发了第三种开发方式:James Clark开发的转换语言DSSSL SGML文档提出了一种格式样式的可能性,该格式样式不仅是描述性的,而且近似于一种真正的编程语言。 Netscape紧随其后,Netscape在1996年为W3C提供了“基于JavaScript的样式表(JSSS)”,该样式表由Netscape Navigator 4在1997年实现。

The origins of CSS are related to three major alternatives:

CSS的起源与三个主要选择有关:

  • HTML is there a format or structure of a mixed format editing and structuring?

    HTML是否有格式或混合格式的编辑和结构结构?
  • The choice of presentation of the author should they take precedence over those of the user?

    作者呈现方式的选择是否应该优先于用户呈现方式?
  • The answer is she needs a format description of the formatting, or a transformation language?

    答案是她需要格式的格式说明或转换语言?

最初的发展 (The first developments)

The first proposal for HTML Cascading Style Sheets made by Håkon Wium Lie holds the attention of Dave Raggett, who was then the chief editor of the draft specification HTML3.0. A supporter of a purely structural HTML, encourages publication of a paper CHSS, so that it can be presented and discussed at the Second International Conference on the WWW (Mosaic and the Web ‘, Chicago, 1994). It also modifies the browser with Håkon Lie Arena [14], to allow testing this format, and demonstrated at the Third Conference WWW 1995.

HåkonWium Lie提出的有关HTML级联样式表的第一个建议引起了Dave Raggett的注意,他当时是规范草案HTML3.0的主编。 纯结构HTML的支持者鼓励发表CHSS论文,以便可以在第二届WWW国际会议(马赛克和Web',芝加哥,1994年)上进行介绍和讨论。 它还使用HåkonLie Arena [14]修改了浏览器,以允许测试此格式,并在1995年第三届WWW会议上进行了演示。

Meanwhile, Bert Bos, who was then working on the browser Argo, and who had submitted its own draft to the W3C “Stream-based Style Sheet Proposal (SSP), decides to join its effects to those of Håkon Lie. PHC was developed with the idea of being applicable not only HTML but also other markup languages, Bert Bos and Håkon Lie repeat this purpose, and form a key feature of the CSS itself becomes said.

同时,当时正在使用浏览器Argo的Bert Bos,并已向W3C“基于流的样式表提议(SSP)”提交了自己的草案,决定将其效果与HåkonLie结合使用。 PHC的开发理念是不仅适用于HTML,而且适用于其他标记语言,Bert Bos和HåkonLie重复了这一目的,并形成了CSS本身的关键特征。

Another aspect of CSS is so crucial to address the existing alternatives: CSS is the first format to include the idea of “cascading” (cascading style sheet), that is to say, the possibility for style a document to be inherited from more of a “style sheet”. This helps to mediate between several competing sources of shaping an element, and thus meets the need for compromise between the stylistic preferences of the authors and users.

CSS的另一个方面对于解决现有的替代方案至关重要:CSS是第一种包含“层叠”(层叠样式表)思想的格式,也就是说,样式文档可以从更多的样式中继承的可能性。 “样式表”。 这有助于在塑造元素的几个竞争来源之间进行调解,从而满足在作者和用户的风格偏好之间进行折衷的需要。

The World Wide Web Consortium (W3C) becomes operational in 1995, and the mailing list www-style is created. The same year held in Paris a “W3C style sheet workshop” decisive for the future of CSS. Paper includes sets the goal to keep the style sheets in a simple form, which excludes the hypothesis JSSS Netscape. Moreover, Thomas Reardon (Microsoft), announcing the coming of CSS support in future versions of Internet Explorer, therefore, when the W3C creates the end of the “HTML Editorial Review Board (ERB HTML ) to ratify the future HTML specifications, DOM and CSS, Netscape, represented by Lou Montulli, finally joins the CSS project led by Bert Bos and Håkon Lie.

万维网联盟(W3C)于1995年投入运营,并创建了www-style邮件列表。 同年在巴黎举行了决定CSS未来发展的“ W3C样式表研讨会”。 本文包括设定目标,以使样式表保持简单形式,这排除了假设JSSS Netscape。 此外,托马斯·雷顿(Thomas Reardon,微软)宣布在Internet Explorer的未来版本中将提供CSS支持,因此,当W3C创建“ HTML编辑评审委员会(ERB HTML)”的结尾以批准未来HTML规范,DOM和CSS时, ,由Lou Montulli代表的Netscape最终加入了由Bert Bos和HåkonLie领导CSS项目。

走向艰难的成熟 (Towards a difficult maturation)

Unlike software, the CSS specifications are developed by successive versions, which would allow a browser to refer to a specific version. CSS was developed by “levels”, which requires each new level to integrate the preceding, and each implementation to be compatible with its predecessor: CSS1 is developed to be a subset of CSS2, which is itself designed to be a subset of CSS3. This partly explains the slow progress normative CSS.

与软件不同,CSS规范由连续的版本开发,这将允许浏览器引用特定的版本。 CSS是由“级别”开发的,它要求每个新级别都集成前一个级别,并且每个实现都必须与其前身兼容:CSS1被开发为CSS2的子集,而CSS2本身被设计为CSS3的子集。 这部分解释了规范CSS的进展缓慢。

浏览器大战期间CSS1的实现很困难 (CSS1 implementations difficult during the browser wars)

The CSS1 specification Final published December 17, 1996, and fifty sets of properties. CSS1 is defined as a mechanism of simple style sheet, allowing authors and readers to attach style in HTML documents. This simplicity is reflected in the choice of a language that can be easily read and written directly by human users, and language consistent with normal practice in publishing computer. The eventual choice to express CSS in XML or SGML syntax, regularly invoked to prevent the implementation of a new mode of parsing, is definitely ruled out.

CSS1规范最终发布于1996年12月17日,具有50组属性。 CSS1被定义为一种简单样式表的机制,允许作者和读者在HTML文档中附加样式。 这种简单性体现在人们可以轻松地直接读写的语言的选择上,以及与出版计算机中的常规做法一致的语言。 绝对排除了最终选择以XML或SGML语法表示CSS(通常是为了防止实施新的解析模式而调用)。

CSS1 does not describe only its own grammar: the first level in fact describes a grammar to enable the later levels add new features, while authorizing the future reading these stylesheets by implementations of origin. These new features will not be included in the original implementations, but may be identified as such and ignored. CSS ensures its compatibility.

CSS1不仅描述了它自己的语法:实际上,第一个级别描述了一种语法,该语法使后面的级别可以添加新功能,同时授权将来通过源实现来阅读这些样式表。 这些新功能将不包含在原始实现中,但可以这样标识并忽略。 CSS确保其兼容性。

CSS1 defines essentially rendering properties Typographic text: fonts (fonts), color, font size, fat, spacing, border management and markers list. It is therefore no question of “layout” property float, which will be subsequently used heavily for CSS layout designs comprehensive web is then conceived as a way to place locally coast to coast, a small portion of content, such as a picture, and the rest of the text. Given the problematic implementations of CSS1, the diversion of the HTML table for managing the overall layout is immediately the most commonly used by the authors of web content.

CSS1本质上定义了渲染属性印刷文本:字体(字体),颜色,字体大小,粗细,间距,边框管理和标记列表。 因此,“布局”属性浮动毫无疑问,该属性随后将大量用于CSS布局设计中,然后将综合Web设想为一种将本地内容沿海岸,一小部分内容(例如图片)和其余部分。 考虑到CSS1的实现存在问题,用于管理总体布局HTML表的转移立即成为Web内容作者最常用的方法。

In 1996, Internet Explorer 3.0 is the first commercial browser to implement CSS in part while it is still being formulated. This implementation early, led by Chris Wilson does not match the final specification. In 1997, Internet Explorer 4.0 saw the birth of a new rendering engine, Trident, causing the problem but growing support for CSS in different versions of the browser on Windows, until IE7 included.

1996年,Internet Explorer 3.0是第一个实现CSS的商业浏览器,部分仍在制定之中。 由克里斯·威尔逊(Chris Wilson)领导的早期实施与最终规范不符。 1997年,Internet Explorer 4.0诞生了一个新的渲染引擎Trident,这引起了问题,但在Windows的不同版本的浏览器中,对CSS的支持越来越多,直到包括IE7。

Netscape Navigator 4.0 follows the movement in 1997, despite its historical reluctance vis-à-vis CSS in the context of the browser wars, then it is mainly to ensure that Microsoft can not emerge as the browser more compliant. However, this implementation precipitated, based on internal javascript methods, is finally revealing some readable content producers. Netscape Navigator 4.0 also provides an implementation JSSS, which will remain short-lived. Not until the new Gecko rendering engine and its integration in Netscape 6 for achieving real implementation of CSS1.

Netscape Navigator 4.0跟随1997年的发展,尽管它在浏览器大战中相对于CSS一直很不情愿,但这主要是为了确保Microsoft不会因为浏览器的兼容性而出现。 但是,基于内部javascript方法促成的此实现最终揭示了一些可读的内容生成器。 Netscape Navigator 4.0还提供了一个实现JSSS,它将保持短暂状态。 直到新的Gecko渲染引擎及其在Netscape 6中的集成才能实现CSS1的真正实现。

In 1998, while ending the browser wars between Netscape and Microsoft, Opera 3.5, which Håkon Lie has meanwhile become the technical director, achieves a more complete implementation of CSS1, facilitated by the publication of the first “Test Suite for Cascading Style Sheets (CSS) Level 1 “created mainly by Eric Meyer for the W3C [26]. The presence of these test suites is proving a major asset for both implementations in browsers and the appropriation of CSS techniques by the authors (by providing detailed examples of properties and their values).

1998年,HåkonLie成为技术总监,同时结束了Netscape和Microsoft之间的浏览器之战,Opera 3.5实现了CSS1的更完整实现,并发布了第一个“级联样式表测试套件(CSS)”。 )“ 1级”,主要由Eric Meyer为W3C创建[26]。 这些测试套件的存在证明了浏览器实现和作者使用CSS技术的主要资产(通过提供属性及其值的详细示例)。

Finally, under the leadership of Tantek Çelik, Internet Explorer 5.0 for Macintosh was launched in March 2000, based on the Tasman, a renderer specific unrelated Trident is the first browser to fully support (over 99%) CSS1. For compatibility with previous coding practices specific to each implementation (the “tag soup”) and allow the proper display of Web documents that are friendly or not standard CSS and HTML, it is also the first to implement the technique of doctype switching. Subsequently adopted by all browsers, it subsequently became one of the keys to the phased implementation of CSS: it makes it possible to keep old browser implementations owners for reasons of compatibility, while having the opportunity to opt, depending on the syntax of type declaration page document, a way to conform to new standards implementations.

最后,在TantekÇelik的领导下,基于Tasman的Macintosh Internet Explorer 5.0于2000年3月启动,与渲染器无关的Trident是第一个完全支持(超过99%)CSS1的浏览器。 为了与特定于每种实现的先前编码实践(“标签汤”)兼容并允许正确显示友好的或不符合标准CSS和HTML的Web文档,这也是第一个实现doctype切换技术的方法。 随后被所有浏览器采用,后来成为分阶段实现CSS的关键之一:由于兼容性的原因,它可以保留旧的浏览器实现所有者,同时有机会根据类型声明页面的语法进行选择文档,一种符合新标准实施的方法。

During this period of the late 1990s, the web design is primarily dependent on the use of HTML as a presentation format. The defeat of Netscape after the browser wars, the renewal that follows through the Mozilla project, the appearance of IE5 Mac, and a lesser extent the evolution of Windows Internet Explorer 5.x , however, begin in the early 2000s a new stage in the evolution of design practices of the websites by the authors: These browsers make it possible to show that historical practice dating back to the browser wars, mixing structure and presentation, can really be abandoned in favor of an approach based on style sheets and more general respect for web standards (within the meaning of HTML and CSS). Jeffrey Zeldman, co-founder of the Web Standards Project and founder of A List apart in 1998, appears as the figurehead of this movement to promote standards. It is also the inspiration for a design approach “hybrid,” taking advantage of CSS techniques while residing temporarily in the context of formatting documents based on presentation boards.

在1990年代后期的这段时间里,网页设计主要取决于使用HTML作为表示格式。 在浏览器大战之后,Netscape的失败,通过Mozilla项目的更新,IE5 Mac的出现以及Windows Internet Explorer 5.x的较小程度的发展,都在2000年代初开始进入新的阶段。作者对网站设计实践的演变:这些浏览器可以显示出可以追溯到浏览器战争,混合结构和表示形式的历史实践,而实际上可以放弃基于样式表和更广泛尊重的方法用于Web标准(在HTML和CSS的含义内)。 Web标准项目的联合创始人和1998年A List的创始人Jeffrey Zeldman似乎是推动标准运动的代表人物。 这也是设计方法“混合”的灵感,它利用CSS技术,同时暂时停留在基于演示板格式化文档的上下文中。

Continued…

继续…

翻译自: https://www.eukhost.com/blog/webhosting/css-cascading-style-sheets-part-2/

css级联样式表

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值