List-style:none inside url(filename.gif);
二、 运用4种方法来引入CSS样式
1.link
<link rel=”stylesheet” type=”text/css” href=”a.css”>
rel 关系
type 数据类型,有多种
href 路径
部分浏览器支持候选样式,关键字:alternate:
<link rel=”stylesheet” type=”text/css” href=”a.css”>
<link rel=”alternate stylesheet” type=”text/css” href=”b.css”>
<link rel=”alternate stylesheet” type=”text/css” href=”c.css”>
2.内部样式块
<style>
<!–
h1{color:red;}
–>
</style>
3.@import
@import url{a.css}
注意:此指令必须放在<style>容器中,并且在所有样式之前
建议放在一个html注释中,<!– –>浏览器会不显示注释内的内容,而import等css代码能正常工作
4.内联样式
<p style=”color:red;”>
选择器是css的一个基本概念,基本规则如下:
1.规则结构:
h1 {color:red;}
选择器 {属性:值;}
这类是元素选择器,基本可以包括所有html的元素
属性值可以包括多个元素,如:border:1px solid red;
常用语法
1)分组:
选择器和声明都可以分组:
h1,h2,h3{color:red;background:#fff;} ,选择器用“,”分割开,属性用”;”分割
2)类选择器,即通过class=”stylename”应用的声明
定义:










