没有合适的资源?快使用搜索试试~ 我知道了~
CSS 英文教程 CSS语法
需积分: 0 0 下载量 171 浏览量
2020-12-10
19:53:01
上传
评论
收藏 21KB PDF 举报
温馨提示
试读
3页
Syntax The CSS syntax is made up of three parts: a selector, a property and a value: selector {property:value} The selector is normally the HTML element/tag you wish to define, the property is the attribute you wish to change, and each property can take a value. The property and value are separat
资源推荐
资源详情
资源评论
CSS 英文教程英文教程 CSS语法语法
Syntax
The CSS syntax is made up of three parts: a selector, a property and a value:
selector {property:value}
The selector is normally the HTML element/tag you wish to define, the property is the attribute you wish to change, and each
property can take a value. The property and value are separated by a colon, and surrounded by curly braces:
body {color:black}
Note: If the value is multiple words, put quotes around the value:
p {font-family:”sans serif”}
Note: If you want to specify more than one property, you must separate each property with a semicolon. The example below
shows how to define a center aligned paragraph, with a red text color:
p {text-align:center;color:red}
To make the style definitions more readable, you can describe one property on each line, like this:
p
{
text-align:center;
color:black;
font-family:arial
}
Grouping
You can group selectors. Separate each selector with a comma. In the example below we have grouped all the header
elements. All header elements will be displayed in green text color:
h1,h2,h3,h4,h5,h6
{
color:green
}
The class Selector
资源评论
weixin_38737366
- 粉丝: 5
- 资源: 950
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功