20180711 懵逼的一天

今天感觉学了好多好多,大脑一直在转动思考。

<title> css样式表学习</title>
<style>

#bq3{color: chartreuse; background-color: deeppink;}
.bq5{color: black; background-color: palevioletred}
.bq4{color: aqua; background: red;}
#bq4,#bq5{text-decoration:overline;}

</style>

 

</head>
<button onClick="alert('清理成功')">清除缓存</button>

<body>
css :层叠样式表
写法分类:
1.内联(行内
写在标签里面,以属性的形式表现,属性名是style
<span style=""> </span>
2.内嵌
写在head标签里面,以标签的形式表现,标签名style
3.外部引用
写在head标签里面,以标签的形式表现,标签名link

样式格式:
样式名:样式值 ;

选择器:找元素,找标签

选择器{样式名:样式值 ;
}
选择器有哪些:
标签选择器 标签名
id选择器 #id属性值
class选择器 .class属性值
并列选择器 选择器1,选择器2{} 关键是,
后代选择器 选择器1,选择器2 关键是空格
属性选择器 选择器 【属性名=‘属性值’】{}
优先级:
行内的是最高优先级
(权值越高 优先级越高)
行内 1000
id 100
class 10
标签 1
*(通用选择器) 0
*{}
<div ="color:red; font: 500">这是一个标签1</div>
<div id="bstyleq2" class="bq2">这是一个标签2</div>
<div id="bq3" class="bq3">这是一个标签3<div>
<div id="bq4" class="bq4">这是一个标签4</div>
<div id="bq5" class="bq5">这是一个标签5</div>

css样式
一般样式:文本 背景 字体
布局: 定位 浮动 显示
动画 : 渐变 旋转 3D

标签背景

background-image 背景图片
background-repeat
background-attachment
background-position 背景位置
<link rel="stylesheet" href="路径">
<link rel="stylesheet" href="">
简写:background: color image repeat attachment position

文本:text-*
color 颜色
text- align 对齐方式
text-indent 字体缩进
line-heigut 行高
字体
font-famliy 微软雅黑
font-size 指定文本的字体大小
font-style 指定文本的字体样式
font-weight 指定字体的粗细
列表
list-style-type

属性 描述
list-style 简写属性。用于把所有用于列表的属性设置于一个声明中
list-style-image 将图象设置为列表项标志。
list-style-position 设置列表中列表项标志的位置。
list-style-type 设置列表项标志的类型。

#dd
{ 500px;
height: 100px;
border: 1px solid black;
background: url('../b.jpg');
background-repeat: no-repeat;
background-position: 10% 10%; }

今天感觉学到了很多,主要是自己理解不透彻,所以得加倍的敲  加倍的努力。

不怕学不会,就怕自己从心里已经放弃了。

原文地址:https://www.cnblogs.com/sp1234/p/9295666.html