background-color
背景颜色background-image
背景图片background-image:url("1.png");
背景平铺background-repeat:
repeat
默认平铺 |no-repeat
不平铺 |repeat-x
水平方向平铺,垂直不平铺 |repeat-
y 垂直方向平铺
background-position
background-position:left;
(方向在左面,垂直方向居中) background-position:right buttom;
background-position:center;
background-position:20px,30px;
background-attachment: scroll | fixed;
scroll图片定位从元素的定位出发(默认)。
fixed图片定位从浏览器定位出发。
<head><style type="text/css">.box{width:1400px;height:1500px;background-image:url("1.png");background-repeat:no-repeat;background-position:bottom right;background;fixed;}</style>
</head>
<body><div class="box">df<div>
</body>
background:red url("1.png") no-repeat bottom;
特点:连写时没有顺序要求,url为必写项,位置,重复等才会生效。
※清除列表项前面的小标
li{list-style:none ;
}
本文发布于:2024-01-31 17:13:48,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170669242830108.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |