微客互联
氵沐子-微客互联欢迎您的光临>>

Css笔记(Cascading style sheets)

选择器{属性:值;属性:值;属性:值;}

直接插入

<head>

<style type="text/css">

input{font-size:20;color:red}

</style>

</head>

引用

H1{color:red;text-size:34}

<head>

<link rel=” stylesheet” type=”text/css” href=”文件”>

</head>

 

样式类:

元素可以通用

.bluebig

{type的属性一样}写在css

Class=”bluebig”写在html

元素id:

特定元素指定特定的样式

#aa

{type的属性一样}写在css

id=”bluebig” html

伪类:

页面中处于某种特定状态定义一个样式

链接的样式

1a:link { font-size: 14pt; text-decoration: underline; color: blue; }

设置 a 对象在未被访问前的样式。

2a:hover { font-size: 14pt; text-decoration: underline; color: blue; }

设置对象在其鼠标悬停时的样式

3a:active { font-size: 14pt; text-decoration: underline; color: blue; }

设置对象在被用户激活(在鼠标点击与释放之间发生的事件)时的样式。

4a:visited { font-size: 14pt; text-decoration: underline; color: blue; }

设置 a 对象在其链接地址已被访问过时的样式。

分类:

h1.s1

{type的属性一样}

h1.21

{type的属性一样}

html引用:<h1 class=”s1”></h1>选择了第一个样式

选择:

B h1{type的属性一样}被包含在b内的h1的颜色

html<b><h1>包含在里的颜色</h1><b>

 

框模型

Margin外边际

Padding 内边际

 

 

posted on 2009-12-21 12:11  氵沐子  阅读(333)  评论(0编辑  收藏  举报