国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Introduction to CSS

Before you start learning CSS, you should make sure you have the following prerequisite knowledge:

  • HTML / XHTML

To learn HTML and XHTML , you can find relevant tutorials through the PHP Chinese website (php.cn) homepage


To learn CSS, you need to know what CSS is?

  • CSS refers to Cascading Style Sheets

  • Styles define how HTML elements are displayed

  • Styles are usually stored In the style sheet

  • Adding styles to HTML 4.0 is to solve the problem of separation of content and presentation

  • External style sheets can be extremely Greatly improve work efficiency

  • External style sheets are usually stored in CSS files

  • ##Multiple style definitions can be cascaded into one


Styles solve a big problem

HTML tags were originally designed to define document content, as shown in the following example :


##This is a title

This is a paragraph.



Style sheets define how HTML elements are displayed, just like the HTML 3.2 font tag and color attributes do. Styles are usually saved in external .css files. External style sheets give you the ability to change the layout and appearance of all pages in your site at the same time by simply editing a simple CSS document.

In order to solve this problem, the World Wide Web Consortium (W3C), a non-profit standardization alliance, has taken on the mission of standardizing HTML and created styles outside of HTML 4.0.

Contemporary browsers all support CSS.


CSS style sheets greatly improve work efficiency Style Table defines how HTML elements are displayed

Style sheets define how HTML elements are displayed, just like the HTML 3.2 font tag and color attributes do. Styles are usually saved in external .css files. External stylesheets give you the ability to change the layout and appearance of all pages in your site simultaneously by editing a simple CSS document.


CSS Example

An HTML document can display different styles

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>PHP中文網(wǎng)(php.cn)</title>
    <style>
        h1{color: #00a0e9}
        p{background-color: #8de943
        }
        p.ex {margin-top:2cm;}
        p.bottommargin {margin-bottom:25%;}
    </style>
</head>
<body>
<h1>標(biāo)題</h1>
<p>一個(gè)沒有指定邊距大小的段落。</p>
<p class="ex">一個(gè)2厘米上邊距的段落。</p>
</body>
</html>

Run the program and try it



Continuing Learning
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文網(wǎng)(php.cn)</title> <style> h1 {color:#00ff00;} p{color: #ffd4f0 } .ex {color:rgb(0,0,255);} </style> </head> <body> <h1>這是一個(gè)標(biāo)題</h1> <p>這是一個(gè)普通的段落。請注意,本文是紅色的。頁面中定義的默認(rèn)文本顏色選擇器。</p> <p class="ex">這段文字是藍(lán)色的</p> </body> </html>
submitReset Code