tailieunhanh - Học JavaScript qua ví dụ part 58

CSS là gì? Cascading Style Sheets (CSS) là một tiêu chuẩn giới thiệu bởi World Wide Web Consortium (W3C) vào năm 1995 để giúp các nhà thiết kế có được kiểm soát nhiều hơn các trang web của họ bằng cách nâng cao những gì HTML có thể làm-nó được dùng để phong cách hóa các nội dung của một trang Web. Trong khi HTML là có liên quan với cấu trúc và tổ chức của một tài liệu, CSS liên quan đến việc bố trí và trình bày của mình, hoặc định dạng tài liệu. . | chapter 14 Introduction to CSS Cascading Style Sheets with JavaScript What Is CSS Cascading Style Sheets CSS was a standard introduced by the World Wide Web Consortium W3C in 1995 to help designers get more control over their Web pages by enhancing what HTML can do it is used to stylize the content of a Web page. Whereas HTML is concerned with the structure and organization of a document CSS is concerned with its layout and presentation or formatting the document. In the old days HTML tags were used to set up the structure and style of a page. If you wanted to create an H1 tag with an Arial blue font point size 22 you would have to set the same attributes for each H1 tag in the entire document To apply these changes to an entire Web site could be a daunting task. With CSS you can set the style once for all H1 tags and put that style definition in its own .css file. When the page is loaded the CSS style will be applied to all H1 tags in the page in one sweeping change. Because the initial style of the content of a page is done with CSS we ll start there. The goal is to use CSS with the DOM and JavaScript Chapter 15 together to dynamically change the style of the page often called Dynamic HTML DHTML . For a complete discussion of CSS both CSS1 and CSS2 see http Style CSS. If you are a designer and already have a good CSS foundation you can skip this chapter and go directly to Chapter 15 The W3C DOM and JavaScript. What Is a Style Sheet Webster s Dictionary defines style as a manner of doing something very grandly elegant fashionable. Style sheets make HTML pages elegant by allowing the designer to create definitions to describe the layout and appearance of the page. This is done by creating a set of rules that define how an HTML element will look in the document. For example if you want all H1 elements to produce text with a green color set in an Arial 14-point font centered on the page normally you would have to assign these attributes 527 From .

TỪ KHÓA LIÊN QUAN