<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		
		<title>相对位置</title>
		<style type="text/css">
			/*相对位置:他是相对于原来的位置。*/
			body{
				padding: 100px;
				margin: 0px;
			}
			div{
				width: 200px;
				height: 200px;
				
			}
			#d{
				border: 3px dotted red;
			}
			#d1{
				border: 1px solid red;
				position: relative;
				left: 50px;
				top: 50px;
			}
		</style>
	</head>
	<body>
		<div id="d">
			<p>你好</p>
		</div>
		<div id="d1">
			
		</div>
	</body>
</html>

HTML5相对位置

相关文章:

  • 2021-03-30
  • 2022-01-07
  • 2021-11-23
  • 2021-11-23
  • 2021-12-24
  • 2021-12-31
  • 2022-01-10
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2022-01-11
  • 2022-12-23
相关资源
相似解决方案