得到
  • 汉语词
  • 汉语典q
当前位置 :
个人html
更新时间:2024-04-28 00:31:59

1、行内样式(内联样式)

例:<body >

2、内部样式

例:<head>

<style type="text/css">

body {

background-color:#cccccc;}</style></head>

3、外部样式

例:style.css

body { background-color:#cccccc;

}index.html

<head>

<link rel="stylesheet" type="text/css" href="style.css" />

</head> css选择器

1、标签选择符(又称为元素选择符、类型选择符)

2、id 及 class 选择符

3、属性选择符 [title] a{color:red;} (为所有的属性是title的a标签的元素变成红色)

4、包含选择符

5、伪类选择符

a:link {color: #FF0000; text-decoration: none} /* 未访问的链接 */

a:visited {color: #00FF00; text-decoration: none} /* 已访问的链接 */

a:hover {color: #FF00FF; text-decoration: underline} /* 鼠标在链接上 */

a:active {color: #0000FF; text-decoration: underline} /* 激活链接 */

6、优先级依次是:

行内样式表 > 内部样式表 > 外部样式表

7、选择符id的定义优先于class 的定义

8、通配符 *

9、浏览器优先执先 !important标注的语句。

579范文网专稿内容,转载请注明出处
不够精彩?
579范文网(579f.com)汇总了汉语字典,新华字典,成语字典,组词,词语,在线查字典,中文字典,英汉字典,在线字典,康熙字典等等,是学生查询学习资料的好帮手,是老师教学的好助手。
声明:本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。

邮箱:  联系方式:

Copyright©2009-2021 579范文网 579f.com 版权所有 闽ICP备18026954号-18