标签:style blog http io color ar os sp div
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>浮动元素居中</title> <style type="text/css"> <!-- #hezi { position:absolute; left:50%; top: 50%; } .s_cell { float:left; position:relative; right:50%; bottom: 50%; background: red; } --> </style> <meta http-equiv="Content-Type" content="text/html; charset=uft-8"></head> <body> <div id="hezi"> <div class="s_cell"> <span class="font_style">浮动元素内容1浮动元素内容1浮动元素内容1浮动元素内容1</span> </div> </div> </body> </html>
标签:style blog http io color ar os sp div
原文地址:http://www.cnblogs.com/yutaoyao/p/4079470.html