zoukankan      html  css  js  c++  java
  • css块级元素居中

    <!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;
    			 300px;
    			height: 200px;
    			position: absolute;
    		}
    		.box{
    			border: 1px solid #000;
    			 50px;
    			height: 50px;
    
    			position: absolute;
    			margin: auto;
    			left: 0;
    			right: 0;
    			top: 0;
    			bottom: 0;
    
    		}
    	</style>
    </body>
    </html>
    

      

  • 相关阅读:
    Spring----Day03
    Spring----Day02
    python
    python
    python
    python
    python
    python
    python
    python
  • 原文地址:https://www.cnblogs.com/jsplyy/p/5615967.html
Copyright © 2011-2022 走看看