<!-- 文字垂直居中:line-height 等于行高height,
字体大小:font-size:
text-indent:2em 首行缩进2字符
背景图片:background-image:none()默认 或者:url(图片地址)
背景平铺:可以让背景图片按指定平铺 4种:
background-repeat:repeat(默认) no-repeat repeat-x repeat-y
背景图片位置:background-position:+方位名词(如 center right 默认居中)
或者精确位置 (50px 20px) 前面x轴 后面y轴 还可以是混合单位
背景图片固定与否:background-attachment: scroll(滚动 默认)或者fixed(固定)
快捷写法(顺序不强制):background:颜色 插入文件 平铺与否 固定与否 位置;
背景色半透明:background:rgba:(0,0,0,0.3) 这个a控制透明度(0~1)
-->
HTML背景图片基础知识
最新推荐文章于 2024-05-20 20:40:01 发布