css
style 修饰
width 宽度
height 高度
title 想说明的
visibility 元素可见性
text-align 水平对齐方式
white-space 文本换行
text-indent 缩进
border:边框
border-width 指定边框的宽度
border-style 指定边框的样式
border-color 指定边框的颜色
border-image 指定作为div元素周围边框的图像
flex 弹性布局
align-content
align-items
flex-direction
flex-wrap
flex-flow
animation 动画
animation-name 指定要绑定到选择器的关键帧的名称
animation-duration 动画指定需要多少秒或毫秒完成
animation-timing-function 设置动画将如何完成一个周期
animation-delay 设置动画在启动前的延迟间隔。
animation-iteration-count 定义动画的播放次数
animation-direction 指定是否应该轮流反向播放动画。
center 居中 left 居左 right 居右
line-height 垂直对齐方式/行高 当行高等于高度时候垂直居中
columns 列
row 行
cursor 鼠标
icon 图标
background 背景
image 引入背景图片(url)
background-position: 背景定位(x轴,y轴;)
background-repeat 背景平铺
:no-repeat;不平铺 repeat-x;水平平铺 repeat-y;垂直平铺
background:url() repeat left center #00; 顺序:背景图片 重复 定位 颜色
background-size 背景尺寸
contain 以最合适的状态展示 可能会留白
cover 尽可能填满
nth-child(下标 注意:从1开始) 注意:项目不用这个。禁用
nth-of-type(下标 注意:从1开始) 注意:项目不用这个。禁用
background-origin: 背景从哪里开始
content-box 背景图像的相对位置的内容框
border-box 背景图像边界框的相对位置
padding-box 背景图像填充框的相对位置
background-clip: 背景从哪里开切
content-box
border-box
padding-box
top/right/bottom/left/center 方向英文:上、右、下、左,中
color 颜色
font 文字
font-family 字体
font-size 字号
font-weight:normal 正常 :bold 加粗
font-style: normal;取消倾斜 :italic;斜体
font:italic bold 24px/24px ‘楷体’; 顺序:是否斜体 是否粗体 字体大小/行高 字体
伪类
a:link 设置未访问时候的颜色 点击后变成a的正常颜色
a:visited 设置访问过后颜色
a:hover 当鼠标放上去会变颜色
a:active 鼠标点击变颜色
li>a li下面的第一级a
伪类选择器
li:last-child li 最后一个
li:first-child li 第一个
p:nth-child(2) 选择作为其父的第二个子元素的每个元素
伪元素
p::after 在每个元素之后插入内容。
p::before 在每个元素之前插入内容
p::first-letter 选择每个元素的首字母
p::first-line 选择每个元素的首行
p::selection 选择用户选择的元素部分
auto 自动居中
margin 外边距
margin-top 上外边距
margin-right 右外边距
margin-bottom 下外边距
margin-left 左外边距
padding 内边距
padding-top 上内边距
padding-right 右内边距
padding-bottom 下外边距
padding-left 左外边距
float 浮动 :left|right|none 左|右|不浮动
cursor:pointer 小手的代码
clear:left|right|both 清除浮动
overflow:hidden 溢出隐藏
index 首页
base 里面写清除默认样式的
text-indent:em 首行缩进 (LOGO名字)以后logo 必须用H1引背景图片 里面写上字
position:relative|absolute|fixed 定位
relative 相对定位
absolute 绝对定位
fixed 固定定位
Left/top/right/bottom 定位的偏移量
z-index 改变标签z轴堆叠顺序
opacity 透明代码 1不透明(0.9 0.8.。。。。) 0透明
filter:alpha(opacity:0-100)
input{outline:none} 取消焦点
标签里面属性 transition=“名字” 过渡 动画
transition 过渡
transition-property 规定设置过渡效果的 CSS 属性的名称
transition-duration 规定完成过渡效果需要多少秒或毫秒
transition-timing-function 规定速度效果的速度曲线
transition-delay 定义过渡效果何时开始
@media screen and (max-width:900px){}; 屏幕自适应