段落标签
<h1>~<h6>:标题
<p>:段落
<br>:换行
<hr>:水平线
<div>:分隔块元素
<span>:行内区域
文本格式化标签
<em>:斜体
<strong>:强调
图片标签
常用标签
src可以标明文件的地址
alt当图片显示不出来时的提示文字
title鼠标移动到图片上的提取文字
超链接标签
<a>标签里面有target属性
_self默认在当前页面打开
_blank在新的页面打开
表单标签
<input>
<select>
<textarea>
<option>
表单元素属性
name和value相互对应 服务器通过name获取value
input标签
type是类型属性取值
name value id分别代表元素名称 元素值和唯一标识
CSS标签
盒子模型
width min-width max-width
height min-height max-height
padding padding-top padding-right padding-bottom padding-left
margin margin-top margin-right margin-bottom margin-left
border border-top border-right border-bottom border-left
定位
position:
static: 默认,不可以通过left,right,bottom,top调整位置
relative:相对定位,可以通过left,right,bottom,top调整位置
absolute:绝对定位元素,可以通过left,right,bottom,top调整位置,定位参照对象
fixed:固定定位
文字
color #fff #ffffff rgb(255,255,255)
text-align 设置内容在水平位置
left right center 左对齐 右对齐 居中
字体
font-family:字体名称
font-weight:设置粗细
font-size:设置大小
line-height:设置高度
font-style
normal:正常
italic:斜体
oblique:倾斜
背景
background-color
background-image
background-repeat 平铺
background-position 位置:background-position:10px 20px
background-size 设置背景图片大小
动画
transition:用来决定哪些css属性需要参与动画:transition:all 2s 在2s内完成
transform:
平移:translateX(30px),translateY(10px)
缩放:scale(0.5)
animation:
使用动画:
animation-duration:动画的持续时间
animation-name:动画名称
animation-iteration-count:动画执行次数:infinite 无限次数执行
animation-timing-function:动画的执行节奏