CSS 基础学习-244 css 背景图像 属性

hrs 提交于 2023/09/09 - 16:46 , 周六

实例代码:

		<meta charset="utf-8">
		<style>
			div{
				background-image:url(img/OIP-C.png),url(img/aa.jpg);
				background-repeat:no-repeat,repeat;
				padding:15px;
				background-position:right 50px top 30px  ,left top;
				
			
			}
		
		</style>
	</head>
	<body>
		<h1>多重背景</h1>
		<p>下面的div元素有两副背景图像:</p>
		<div>
			<h2>Welcome to Shanghai</h2>
			<p>shanghai is one of the four direct-administered municipalities of the People's Republic of china.welcome shanghai.</p>
			<p>The city is located on the southern estuary of the Yangtze,with the Huangpu River flowing through it .</p>
		</div>
	</body>
</html>

动行效果:

background

标签