Cascading Style Sheets Tutorial

CSS style sheet: embedded links good or good?

  CSS style sheets is to use    Calling separate document is good, or the direct use of embedded    Embedded within the pages well? Or to say how the two methods used? 

  Acha in the w3cn, he said: 

  Citations 

  In the past, we usually use two kinds of ways to use style sheets: 

  Pages embedded law: the style sheet will be written directly in the head area code pages.    Something like this: 

  <style Type="text/css"> <! - Body (background: white; color: black;) -> </ style> 

  External call law: write in the style sheet will be an independent. Css document, and then head in the area of the page code similar to the following calls. 

  <link Rel="stylesheet" rev="stylesheet" href="css/style.css" type="text/css" media="all" /> 

  In line with the design of the web standards, we use an external call, the benefits self-evident, you can not only modify revised pages. Css document and change the style pages.    If all the pages are calling with a style sheet files, to a style sheet document, all documents can be changed styles. 

  That is a very respected by Ajie    The.    Acha add to the case, the use of    The benefits from the revision is not only convenient style sheet, but will also speed up user's browser.    Users first open the style sheet link pages, style sheets will be automatically downloaded to a local cache which.    When the user to open another page, and if this page also has links to the same style table, read from the cache of documents related to this will be speeded up to speed. 

  But I have also come across such a situation: sometimes encountered network is not smooth, open the pages, the links style sheet did not load successfully.    The consequences of such a situation, not just pages of text colour, size, style, etc. can not be displayed, more trouble is that is likely to cause the entire page layout Luanletao! 

  For example, I once opened Macromedia.com when encountered poor corporate networks, it may be because many people in the bar bt.    .    .    Results pages show is not like the style sheet form, see familiar with the layout, all the elements are from the top-down, like using a mobile phone in a browser site.    Although the contents can all see, but I have to take the time to familiar with the new layout, browse, they also do not have a smooth feel. 

  Online Home in Jinshan do when (a version now see), and I put all the styles embedded in the pages of the district.    Home is a web site of the largest browse pages, we must ensure high reliability.    And only take on the Home embedded style sheet, or use other pages    , And modify the style will not increase too much workload. 

  Home amaoagou the weekend so, I further form of a planning: the layout and the style: head # # left of the category are embedded within the pages, using other forms of links approach. 

  Summarize: 

  Method 1: Home completely embedded methods are used other pages link approach.    Advantages: This will give assurance that the situation in the network Home bad circumstances still be able to display correctly.    Disadvantages: modify the style, and the need to amend the Waibuyangshibiao Home embedded style sheet in two places. 

  Method 2: will be responsible for the layout of the forms and other written forms separately.    Home embedded layout of the format, and links to other styles; other pages are used to link the two sets of style manner.    Advantages: modify the style, a small amount of work than the first.    Network bad situation, the appearance of Home can not fully guarantee, but at least the distribution will not be chaos. 

  If production is not in line with standard pages, such as a small company's product feature, with the leaders of the table on the topic to ensure that the production line speeds.    Pages will be used for various styles: Links.    This is only a page will be used, but used many times. Style: embedding.    This is only a page will be used and the style of using only one: embedded, or simply writing style ="…" had. 

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: Border Style, css style, css style sheet, div style, List Style Type, style

Releated Posts

  • Web standardization, XHTML and CSS Cascading Style Sheets relations
  • How to manage the production of web site good css style
  • Imprint: Use css style settings iframe
  • Frontpage 2000 in the web site CSS style definition
  • CSS primary entry: Style's repeated statements

This entry was posted on Sunday, February 10th, 2008 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 primary entry: Style's repeated statements
Rational use HTML tags to CSS layout »

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