css和html做一个网页,HTML与CSS代码写出一个简单的页面框架?

html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-

transitional.dtd">

基本框架结构

* { margin:0; padding:0; }

body { margin:0 auto; font-size:12px; font-family:Verdana; line-height:150%; }

ul { list-style:none; }

img { border:0 none; }

a { text-decoration:none; color:#333; }

h1 { font-size:18px; }

h2 { font-size:14px; }

h3 { font-size:14px; font-weight:normal; }

h4 { font-size:12px; }

h5 { font-size:12px; font-weight:normal; }

.clearfloat { clear:both; height:0; font-size: 1px; line-height: 0; }

#container{ margin:0 auto; width:960px; }

/*header*/

#header { height:100px; background:#cf0; }

#header h1 { padding:10px 20px; }

#nav { background:#FF6600; height:35px; margin-bottom:6px; padding:5px; }

#nav ul li { float:left; }

#nav ul li a { display:block; padding:4px 10px 2px 10px; color:#fff; text-decoration:none; }

#nav ul li a:hover { text-decoration:underline; background:#06F; color:#FFF; }

/*main*/

#mainContent { overflow:auto; zoom:1; margin-bottom:6px; }

#side { width:200px; float:left; }

.sidebox { border:1px solid #ed6400; margin-bottom:6px; }

.sidebox h4 { background:#ff911a; padding:2px 6px; border-bottom:1px solid #ed6400; color:#fff; }

.sidebox ul { padding:4px 6px; }

#main { width:742px; float:right; }

.mainbox { border:1px solid #ed6400; margin-bottom:6px; }

.mainbox h2 { background:#ff911a; padding:2px 6px; border-bottom:1px solid #ed6400; color:#fff; }

.mainbox ul { padding:4px 6px; }

/*footer*/

#footer { border-top:3px solid #0CF; height:50px; text-align:center; padding:6px; color:#999; }

块标题

块内容

自己把样式放进css文件里面

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值