Cascading Style Sheets Tutorial

CSS study (1)

  This paper reproduced since www.admin5.com CSS (Cascading Style Sheets) briefed on the study before learning CSS CSS before, first of all, should learn how to write HTML.    If you also know nothing about HTML, see Guide to HTML.    CSS (Cascading Style Sheets) was briefed a group of technical staff come up with HTML, the main focus on the definition of content, such as <p> said that a paragraph heading <h1> said, and are not too many HTML layout design and interface effects.    With the rapid development of Internet, HTML is widely used, Internet website certainly hope that the people doing these beautiful, HTML layout and interface effects of the limitations of increasingly exposed.    To solve this problem, people have also made quite a few detours, had used some bad methods, such as HTML increase to attribute results will be a lot of code become bloated and text into a picture, and too much use of Table to publishing, with The picture that blank white space.    There until the CSS.    CSS web design can be said to be a breakthrough, it has resolved a web interface layout problems.    It can be said that the HTML Tag is the definition of Web content (Content), and CSS decided how to display the content of these pages (Layout).    CSS is the English Cascading Style Sheets, can be translated into Chinese style sheet Series.    CSS their position can be divided into three types: inline style (Inline Style) internal style sheets (Internal Style Sheet) Waibuyangshibiao (External Style Sheet) 


   Embedded style (Inline Style) Inline Style Tag is written in the inside.      Embedded forms only where the Tag effective.      <P Style="font-size:20pt; color:red"> this definition Style <p> </ p> inside the text is 20 pt font, font color is red.      </ P> show examples <html> <head> <title> embedded style (Inline Style) </ title> </ head> <body> <P style="font-size:20pt; color:red"> This embedded style (Inline Style) definition of paragraphs inside the text is 20 pt font, font color is red.      </ P> <P> this text did not use the embedded style.      </ P> </ body> </ html> internal style sheets (Internal Style Sheet) internal style sheet is written in the HTML <head> </ head> inside.      Internal style sheets only to the page where effective.      <HTML> <HEAD> <STYLE Type="text/css"> H1.mylayout (border-width: 1; border: solid; text-align: center; color: red) </ STYLE> </ HEAD> <BODY > <H1 class="mylayout"> use of this title Style.      </ H1> <H1> Style did not use this title.      </ H1> </ BODY> </ HTML> internal style sheets (Internal Sytle Sheet) to use this Tag Style, written as follows: <STYLE type = "text / css ">……</ STYLE> Waibuyangshibiao (External Style Sheet) are needed if many pages the same style (Styles), in what ways?      Will style (Styles) written in a. Css suffix, the CSS document, and then are required in each of these styles (Styles), the website quoted the CSS document.      For example, can use a text editor (NotePad) to establish a call home files, not to use the suffix. Txt, changed. Css.      Content of the document are as follows: H1.mylayout (border-width: 1; border: solid; text-align: center; color: red) then you create a page, the code below: <HTML> <HEAD> <link href = ".. / asdocs / css_tutorials / home.css "rel =" stylesheet "type =" text / css "> </ HEAD> <BODY> <H1 class="mylayout"> use of this title Style.      </ H1> <H1> Style did not use this title.      </ H1> </ BODY> </ HTML> use external (Extenal) style sheet, compared to the embedded (Inline) and internal-(Internal), has the following advantages: Style code can be reused.      An external CSS file can be shared by many website.      Easy to amend.      If we modify the style, CSS only need to amend the document without the need to modify each page.      Page shows that the pace of increase.      If the writing style in the website, the website will show that lowering the speed, if website quoted a CSS document, the CSS document cache in most areas (other web sites have already been invoked it), the page is relatively fast pace.      Tandem (Cascading) CSS first letter, Cascading, Italy for the series.      It refers to the style of different sources (Styles) can be combined to form a style.      Cascading order is: default browser (browser default) (lowest priority) Waibuyangshibiao (Extenal Style Sheet) internal style sheets (Internal Style Sheet) embedded style sheet (Inline Style) (highest priority ) style (Styles) the priority order is embedded within (inline), internal (internal), external (external), the default browser (browser default).      Assumptions embedded (Inline) in the form of a font-size: 30pt, and the internal (Internal) in the form of a font-size: 12pt, then embedded (Inline) will cover internal Style (Internal) style.      Showing examples <HTML> <HEAD> <TITLE> Cascading Order </ title> <STYLE TYPE="text/css"> p (font-size: 12pt) </ STYLE> </ HEAD> <p style = "font - size: 30pt "> embedded pattern of this paragraph (Inline Style) coverage (overwrite) internal style sheets (Internal Style Sheet), indicating that the font size is 30 pt, rather than 12 pt.      </ P> </ BODY> </ HTML>  

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • DotNetKicks
  • DZone

Tags: css button, css download, css fillet, css manuals, css templates, css vertical middling

Releated Posts

  • Css attributes filter
  • Proficient CSS filter (4)
  • The CSS-compatible browser chapter
  • Css property's Suggested order:
  • CSS said filters

This entry was posted on Monday, December 31st, 2007 at 12:00 am and is filed under Css+Div Web Design. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

« Css, and the definition of operating rules
Css Notes (1) »

Leave a Reply

  • Categories

    • CSS Properties (491)
    • CSS Tutorial (1154)
    • CSS Tutorial By Examples (1201)
    • Css+Div Web Design (3274)
    • Xhtml and Web Design (1797)
  • Archives

    • February 2008
    • January 2008
    • December 2007
    • November 2007
    • October 2007
    • September 2007
    • August 2007
    • July 2007
    • June 2007
    • May 2007
    • April 2007
    • March 2007
    • February 2007
    • January 2007
  • Pages

    • About us

Cascading Style Sheets Tutorial