一,基本语法
//1,css引入方法
2,css书写格式
h1,h2{ color:blue;font_size}
二,派生选择器:
根据元素其位置关系定义上下文样式。
例如:我们只想li中的strong中使其样式改为红色,而p的strong不变。
p strong
- li strong
li strong{ color:red;}
三,id基础选择器
1,id选择器可以标有id的html页面进行标识。用#来定义。
id testttttt
#id1{ color:pink;}
2,id选择器和派生选择器一起使用
id testttttt www.baidu.com
#id a{ color:blue;}
四,类选择器;
以一个点来显示。他也可以作为派生选择器
这是class标签啊 //css .pclass{ color:red;}
他也可以做派生选择器使用。
五,属性选择器:
对带有指定样式的html元素设置样式。
shuxingxuanzeqiadafsadf //css
属性和值选择器。
shuxingxuanzeqiadafsadf shuxingxuanzeqiadafsadf //css