啦啦啦 , 我又一次懒了,哎,先放上我的html笔记吧,现在正在整理有关接口与异常的笔记,各位,我们马上见面.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
span标签:表示范围,可以更改span标签内的文字样式
字体
font-family:字体类型
font-size:字体大小(px或em)
font-weight:字体粗细(normal、bold、bolder、lighter、100~900)
font-style:字体风格(normal、oblique(掰斜)、italic(斜体))
font:风格 粗细 大小 类型
文本
color:文本颜色
16进制颜色(最大到F)
rgb(0~255,0~255px,0~255)颜色
rgba(0~255,0~255px,0~255,0~1)给颜色加透明度
argb(0~1,0~255,0~255px,0~255)给颜色加透明度
text-align:(left 居左,right 居右,center 居中,justify 两端对齐)
text-decoration:文本装饰(none,overline,underline,line-through)可以给超链接去下划线
text-shadow:阴影颜色 x轴位移(px) y轴位移(px) 模糊半径(px)
伪类样式
a:link 初始默认
a:hover 鼠标悬浮
a:active 鼠标按住不放
a:visited 访问后
列表样式
list-style-type: none disc circle square decimal
list-style: none disc circle square decimal
list-style-image: url(图片路径)
list-style-position: inside(内部)或outside(外部)
list-style: inside(内部)或outside(外部)url(图片路径)
背景样式
背景颜色:background-color:
背景图片:background-image:url(图片路径)
背景重复方式:
background-repeat:repeat(默认水平垂直平铺) repeat-x(水平平铺) repeat-y(垂直方向平铺) no-repeat(不平铺)
背景图片定位
background-position:
可用 px表示 水平 垂直的位置
百分比表示 水平 垂直的位置
关键字:left right center(只有center!!!) top bottom
background:颜色(图片不显示或显示不满的时候以颜色填充) url(图片路径) 水平位置 垂直位置 平铺方式
background-size:
auto 默认大小
px:设置图片大小
百分比:按块元素的比例缩放跟图片本身大小没关系
cover: 填充整个块元素
contain:保持宽高比例进行缩放图片
浏览器内核前缀
-ms- :ie浏览器
-webkit-:谷歌浏览器和safari浏览器
-moz-:火狐浏览器
-o-:欧鹏浏览器
线性渐变
background:
linear-gradient(方向或to方向,颜色1,颜色2……)
方向:left、right、top、bottom、 left top、left bottom、right top、right bottom
加to与不加to的区别:
加to:从相反方向到 to的方向渐变,有to无前缀
不加to:从加入的方向到相反方向,不加to需前缀
</body>
</html>