/*css 权重
!important. 正无穷
行间样式 1000
id 100
class|属性 10
标签选择器 1
通配符 0*/
/*span {
background-color: red;
}*/
****/*父子选择权
选择标签可以加很多修饰条件
但是只能修饰父子条件
父子选择器的每一个层级都不需要必须是标签
如 可以用class
*/
/*div span {
background-color: blue;
}
span em {
background-color: yellow;
}*/
/*.spanClass em{
background-color: black;
}*/
/*直接子元素选择器
只控制直属父子关系的内容修改
*/
/*div > em {
background-color: red;
}
*/
/*section div ul li a em{
background-color: red;
}*/
/不能单独修改 div下面class=deme的属性
所以用到了 并列选择器/
/*.demo div {
background-color: red;
}*/
/*并列选择器
用多个限制条件选择一个选择器并且不加空格
*/
/*div.demo{
background-color: red;
}*/
/*.box{
background-color: red;
}*/
/*em.box{
background-color: blue;
}*/
/*------------------*/
/*div #IdP{
background-color: red;
}*/
/*100. 1*/
/*#IdDiv p{
background-color: red;
}*/
/*10 10*/
/*.classDiv .classP{
background-color: blue;
}*/
/*10 100*/
/*.classDiv #IdP{
background-color: green;
}
*/
/分组选择器/
/*em,
strong,
span{
background-color: red;
}
*/
/-------css----/
div{
/*字体大小 默认16 一般用12/14
设置字体的时候实际上就是设置字体的高
*/
font-size: 30px;
/加粗属性
bold 加粗
lighter 最细
normal 正常
bolder 特别粗
100-900 也是设置粗细/
font-weight: normal;
/*斜体 等同em
italic
*/
font-style: normal;;
/字体
最常用字体 arial -乔布斯发明/
font-family: arial;
/字体颜色
1.土鳖式 纯英文单词 red green blue。。
2.颜色代码
3.颜色函数/
color: #f40;
/边框
符合属性。
边框宽度 边框类型 边框颜色
solid 线性
dotted 虚线-点
dashed 虚线-条/
border: 100px solid black;
width: 10px;
height: 10px;
border-left-color: red;
border-top-color: blue;
border-right-color: green;
border-bottom-color: transparent;
/transparent. 透明色/
}