<!DOCTYPE html>
<html>
<head>
	<title>index</title>
</head>
<body>
	<div class="container">
		<div class="box"></div>
	</div>
	<style type="text/css">
		.container{
			border: 1px solid #000;
			width: 300px;
			height: 200px;
			position: absolute;
		}
		.box{
			border: 1px solid #000;
			width: 50px;
			height: 50px;

			position: absolute;
			margin: auto;
			left: 0;
			right: 0;
			top: 0;
			bottom: 0;

		}
	</style>
</body>
</html>

  

相关文章:

  • 2022-02-07
  • 2021-08-28
  • 2022-12-23
  • 2021-07-09
  • 2022-02-03
  • 2021-11-22
  • 2021-12-31
  • 2021-12-15
猜你喜欢
  • 2022-12-23
  • 2021-04-15
  • 2021-12-10
  • 2021-12-21
  • 2022-12-23
  • 2021-12-18
  • 2022-01-12
相关资源
相似解决方案