CSS 背景平铺repeat

CSS 背景平铺repeat

前端知识qingyu2020-11-12 9:13:451111A+A-

  CSS 背景平铺repeat

  语法:

  Background-repeat : repeat | no-repeat | repeat-x | repeat-y

参数作用
repeat背景图片纵向和横向平铺( 默认)
no-repeat背景图片不平铺 
repeat-x背景图片横向平铺
repeat-y背景图片纵向平铺
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			div {
				width: 600px;
				height: 300px;
				background-color: pink;
				background-image: url(images/ldh.jpg);
				background-repeat: repeat;
				background-repeat: no-repeat;
				background-repeat: repeat-x;
				background-repeat: repeat-y;
			}
		</style>
	</head>
	<body>
	</body>
	<div>
	</div>
</html>
点击这里复制本文地址 欢迎来到大黄鸡源码分享网
qrcode

大黄鸡源码编程网 © All Rights Reserved.  
网站备案号:闽ICP备18012015号-4
Powered by Z-BlogPHP
联系我们| 关于我们| 广告联系| 网站管理