CSS Syntax
来源:互联网 发布:sai绘画软件官网 编辑:程序博客网 时间:2024/05/25 05:36
CSS Syntax
A CSS rule has two main parts: a selector, and one or more declarations:
The selector is normally the HTML element you want to style.
Each declaration consists of a property and a value.
The property is the style attribute you want to change. Each property has a value.
CSS Example
A CSS declaration always ends with a semicolon, and declaration groups are surrounded by curly brackets:
p {color:red;text-align:center;}To make the CSS more readable, you can put one declaration on each line, like this:
Example
p{
color:red;
text-align:center;
}
Try it yourself »
CSS Comments
Comments are used to explain your code, and may help you when you edit the source code at a later date. Comments are ignored by browsers.
A CSS comment begins with "/*", and ends with "*/", like this:
/*This is a comment*/p
{
text-align:center;
/*This is another comment*/
color:black;
font-family:arial;
}
- CSS Syntax
- CSS Syntax
- CSS Syntax (Selector)
- CSS学习之CSS Syntax
- CSS Fundamentals/Basic CSS Structure & Syntax
- CSS值定义的语法 Value Definition Syntax
- alternative syntax
- crystal syntax
- syntax.c
- java syntax
- Syntax Diagrams
- syntax error
- cron syntax
- Lua syntax
- Ruby Syntax
- Kconfig syntax
- syntax highlighting
- ZenCoding Syntax
- ASP.NET发送电子邮件
- INTEL8086/8088CPU
- 一篇很好的 英文阅读文章,很唯美、和大家一起分享!O(∩_∩)O~
- CheckBox全选
- jdbc例题
- CSS Syntax
- C# Winform 拦截关闭按钮触发的事件
- 只允许输入数字
- 关于win32的C++ 类封装
- Ubuntu11.04下编译最新Linux-3.0-rc7内核
- 自定义ProgressBar
- vs2008 编译 directshow baseclasses
- 日期选择控件
- CSS Introduction