15.背景样式 |
您所在的位置:网站首页 › url术的全称 › 15.背景样式 |
背景的缩写样式:background 1.background-color 背景颜色 书写样式例如:background-color:red; 2.background-image背景图片 书写样式例如:background-image:url(1.jpg); 3.background-repeat背景平铺 书写样式例如:background-repeat:no-repeat;不平铺
background-repeat:repeat-y;纵坐标平铺 background-repeat:repeat-x;横坐标平铺 4.background-position 背景坐标位置 有x轴和y轴两个数值,如果只给一个数值,默认另外的数值居中。 书写样式例如:background-position:10px 30px;即该背景离左边10像素 离上方30像素。 除此之外background-position 支持方位词例如right/left/top/bottom/center 书写样式例如:background-position:right bottom 5.background 缩写样式 书写样式例如:background:url(0.jpg) yellow repeat-x center;即是一个黄色背景色 背景图片横坐标平铺居中的一个样式。 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |