Tags:div css 居中
让div+css的div居中, 而里面的文字不居中的做法:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xml(标准化越来越近了)ns="http://www.w3.org/1999/xhtml"> <head> <title> 做一个测试--飞天WEB开发社区 </title> <style type="text/css" rel="stylesheet"> body{ margin:0px; } #countainer{ margin:auto; width:600px; height:100%; background-color:#cccccc; } </style> </head> <body> <div id="countainer"> 飞天WEB开发社区 测试页面 </div> </body> </html>
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> 转载请注明出处-零柒动力-07er.com |