Panimula ng CSS
- Previous Page Tutorial ng CSS
- Next Page Gramatika ng CSS
什么是 CSS?
- CSS 指的是层叠样式表* (Cascading Style Ssheets)
- CSS 描述了如何在屏幕、纸张或其他媒体上显示 HTML 元素
- CSS 节省了大量工作。它可以同时控制多张网页的布局
- 外部样式表存储在 CSS 文件中
*:也称级联样式表。
CSS 演示 - 一张 HTML 页面 - 多个样式!
下面是一张提供了四个不同样式表的 HTML 页面。请单击下面的样式表链接,来查看不同的样式:
为何使用 CSS?
CSS 用于定义网页的样式,包括针对不同设备和屏幕尺寸的设计和布局。
CSS Example
body { background-color: lightblue; } h1 { color: white; text-align: center; } p { font-family: verdana; font-size: 20px; }
CSS 解决了一个大问题
HTML 永远没有打算包含用于格式化网页的标签!
The purpose of creating HTML isDescribe the web pageFor example:
<h1>This is a title.</h1> <p>This is a paragraph.</p>
After adding tags like <font> and color attributes to the HTML 3.2 specification, the nightmare of web developers began. Large websites added font and color information to each page, which evolved into a long and expensive process.
To solve this problem, the World Wide Web Consortium (W3C) created CSS.
CSS removed the style format from the HTML page!
If you don't know what HTML is, it is recommended that you read HTML Tutorial.
CSS saves a lot of work!
Style definitions are usually stored in external .css files.
By using an external stylesheet file, you only need to change one file to change the appearance of the entire website!
- Previous Page Tutorial ng CSS
- Next Page Gramatika ng CSS