html div 表单,css 表单效果,纯div+css实现

纯div+css实现,大家可以参考下,也许有一些问题,大家可以修正下

73be0644f0ea268d15221b3f520f23bb.png

by 阿会楠 2008-12-4

//js辅助

window.onload = function(){

var initleft = 200;// 初始化第一个定位

var lis = document.getElementById("menu").getElementsByTagName("li");

for(var i = 0;i < lis.length;i++){

lis[i].style.left = initleft + i*100 + "px";

}

}

*{

font-size:12px;

padding:0;

margin:0;

}

body{

text-align:center;

}

#reg{

margin:0 auto;

width:600px;

background:#cccccc;

height:500px;

}

h6{

background:black;

height:28px;

color:white;

text-align:left;

line-height:28px;

padding-left:3px;

}

#menu{

height:30px;

text-align:left;

padding-top:15px;

padding-left:10px;

overflow:hidden;

}

li{

list-style-type:none;

}

#menu li{

float:left;

color:green;

height:30px;

padding:0 5px;

line-height:30px;

margin-left:20px;

position:absolute;

}

.current{

border:1px solid blue;

border-bottom:0;

background:white;

}

#content{

border:1px solid blue;

height:400px;

margin:8px;

margin-top:0;

background:white;

padding:10px;

}

#content dl{

border-top:1px solid #ccc;

border-left:1px solid #ccc;

width:560px;

height:116px;

}

#content dl dd,#content dl dt{

border-right:1px solid #cccccc;

border-bottom:1px solid #cccccc;

height:28px;

}

#content dl dt{

width:200px;

float:left;

text-align:right;

padding-right:3px;

background:#F0F0F0;

line-height:28px;

}

#content dl dd{

width:352px;

float:left;

text-align:left;

padding-left:3px;

}

/*兼容ie 6.0*/

#content dl dd div{

padding-top:3px;

}

欢迎您注册玩具购会员!
用户名
密码
确认密码

举报/反馈

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值