1. Trang chủ
  2. » Tất cả

Html css review 02 css

38 1 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

CSS Review Content Introducing CSS Types of Style Sheets Exploring Style Rules Style Comments Colors Selectors Texts & Fonts Spacings, Borders and Shadows Pseudo Classes & Elements Introducing CSS  HTML only defines a document’s content and structure, not how it should be displayed  The appearance of the page is determined by style sheets written in the Cascading Style Sheets (CSS) language  The CSS language is maintained by the same World Wide Web Consortium (W3C) that defines the standards for HTML  CSS has gone through several versions, the latest of which is CSS Version Types of Style Sheets External Styles  Styles created and placed within a CSS file and linked to the website  To import other CSS files in a CSS document, use @import url(url); Ex: @import url(company.css); @import url(support.css); Embedded Styles  Styles placed within the HTML file itself Embedded styles only apply to the HTML document in which they are created and are not accessible to other documents in the website  Embedded styles should place in tag  Example h1 { color: red; text-align: center; } Inline Styles  Styles are added as attributes of specific elements within the HTML file  Inline style is the highest order of precedence content  Example Sunny Acres Exploring Style Rules 3.1 Style Rules 3.2 Browser Extensions 3.3 Style Specificity & Precedence 3.1 Style Rules 3.2 Browser Extensions 7.5 Combining All Text Formatting  Use shorthand font property font: style variant weight size/height family Spacings, Borders & Shadows 8.1 Spacings (margin, padding) 8.2 Borders 8.3 Rounded Corners 8.4 Shadows 8.1 Spacings (margin, padding)  padding: size  padding: top right bottom left  padding: top left-right bottom  padding: top-bottom left-right  padding-top, padding-right, padding-bottom, padding-left 8.2 Borders  Shorthand border property border-: width style color; border: width style color; 8.3 Rounded Corners  border-radius: top-left top-right bottom-right bottom-left;  border-radius: radius  border-corner-radius: radius; where corner is either top-left, top-right, bottom-right, or bottom-left 8.4 Shadows  Text Shadow text-shadow: color offsetX offsetY blur;  Box Shadow box-shadow: color offsetX offsetY blur; Pseudo Classes & Elements 9.1 Pseudo Classes 9.2 Pseudo Elements 9.1 Pseudo Classes  Structural pseudo class  Dynamic pseudo class 9.2 Pseudo Elements  Generating Content with CSS THE END ... />  To import other CSS files in a CSS document, use @import url(url); Ex: @import url(company .css) ; @import url(support .css) ; Embedded Styles  Styles placed within the HTML file itself Embedded... in the Cascading Style Sheets (CSS) language  The CSS language is maintained by the same World Wide Web Consortium (W3C) that defines the standards for HTML  CSS has gone through several versions,... of which is CSS Version Types of Style Sheets External Styles  Styles created and placed within a CSS file and linked to the website

Ngày đăng: 09/02/2023, 15:34