如:background: #00FF00 url(bgimage.gif) no-repeat fixed top;
可用的属性有:
①background-color: 背景颜色:
可能有的值:-1-: color_name,
-2-: hex_number,
-3-: rgb_number,
-4-: transparent透明,
-5-: inherit
②background-position: 背景图像的位置:
可能有的值:-1-: top left,top center,top right,center left,center center,center right,bottom left,bottom center,bottom right
-2-: x% y% (如:10%,10%)
-3-: xpos ypos (如:10px,10px)
③background-size: 背景图像的尺寸:
可能有的值:-1-: length (如:10px 20px 如果只设置一个值,则第二个值会被设置成auto)
-2-: percentage (如:10%,10%)
-3-: cover 把图像扩展至足够大,已使背景图像完全覆盖背景区域。
-4-: contain 把图像扩展至最大尺寸,使其高度和宽度完全适应内容区域。
④background-repeat: 如何重复背景图片:
可能有的值:-1-: repeat
-2-: repeat-x (如:10%,10%)
-3-: repeat-y
-4-: no-repeat 背景图只显示一次
-5-: inherit
⑤background-origin: 规定 background-position 属性相对于什么位置来定位:
可能有的值:-1-: padding-box 背景图像相对于内边距框来定位。
-2-: border-box 背景图像相对于边框盒来定位。
-3-: content-box 背景图像相对于内容框来定位。
⑥background-clip: 规定背景的绘制区域:
可能有的值:-1-: border-box 背景被裁剪到边框盒。
-2-: padding-box 背景被裁剪到内边距框。
-3-: content-box 背景被裁剪到内容框。
⑦background-attachment: 设置背景图像是否固定或者随着页面的其余部分滚动:
可能有的值:-1-: scroll 默认值。背景图像会随着页面其余部分的滚动而移动。
-2-: fixed 当页面的其余部分滚动时,背景图像不会移动。
-3-: inherit
⑧background-image: 要使用的背景图像:
①transition-property: 规定设置过渡效果的 CSS 属性的名称。
②transition-duration: 规定完成过渡效果需要多少秒或毫秒。
③transition-timing-function: 规定速度效果的速度曲线。
④transition-delay: 定义过渡效果何时开始。
转载于:https://www.cnblogs.com/xinxingyu/p/4744479.html
相关资源:数据结构—成绩单生成器