div仿框架的一个例子 09 December 2009 22:58 Wednesday by 小屋 浏览(1830)

<!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>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta name="author" content="Chomo" />

<link rel="start" href="http://www.14px.com" title="Home" />

<title>利用box-sizing实现div仿框架</title>

<style type="text/css">

* { margin:0; padding:0;}

html { -webkit-box-sizing:border-box; -moz-box-sizing:border-box; box-sizing:border-box; padding:100px 0; overflow:hidden;}

html,body { height:100%;}

.top { position:relative; margin-top:-100px; height:100px; background:#f60;}

阅读全文>>