css简答笔记
CSS创建:
在html中添加
<style type="text/css">.....</style>
CSS选择器
派生选择器通过依据元素在其位置的上下文关系来定义样式
1.id选择器
<style type="text/css">
#name p(这里可以加也可以不加) {
font-weight:bold;
color:blue;
}
</style>
<p id="name">ddd</p>c
2.
.center{text-align: center}
也可以.center p {....}这里是派生选择器,表示只针对p class是 center的情况,也可以写成 p.center{....}
<h1class="center">
This heading will be center-aligned </h1>
CSS 样式
主要是元素的属性,用的时候在看
CSS 框模型
看到
http://www.w3school.com.cn/css/css_boxmodel.asp
posted on 2013-09-18 16:34 Practicer.. 阅读(138) 评论(0) 收藏 举报
浙公网安备 33010602011771号