标签:
1、top、bottom、left、right、position、margin
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> *{ padding: 0; margin: 0; } #box{ position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; width: 200px; height: 200px; margin: auto; background: #000; } </style> </head> <body> <div id="box"></div> </body> </html>
标签:
原文地址:http://www.cnblogs.com/mangoniki/p/5442268.html