求前端html代码,html前端代码

本文介绍了如何使用CSS实现表格中名字、尺寸和价格三列的对齐以及添加不同类型的分隔线,包括顶部外边距、内联块元素、浮动元素和字符方式,展示了多种实用的CSS技巧。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

名字

尺寸

价格

将三行代码放在同一列  名字

尺寸

价格

style="margin-top: 20px  距离外边距20PX

.demo{

width: 600px;

}

.line_01{

padding: 0 20px 0;

margin: 20px 0;

line-height: 1px;

border-left: 200px solid #ddd;

border-right: 200px solid #ddd;

text-align: center;

}

.line_02{

height: 1px;

border-top: 1px solid #ddd;

text-align: center;

}

.line_02 span{

position: relative;

top: -12px;

background: #fff;

padding: 0 20px;

}

.line_03{

width:600px;

}

.line_03 b{

background: #ddd;

margin-top: 4px;

display: inline-block;

width: 180px;

height: 1px;

_overflow: hidden;

vertical-align: middle;

}

.line_03 span{

display: inline-block;

width: 220px;

vertical-align: middle;

text-align: center;

}

.line_04{

width:600px;

}

.line_04{

overflow: hidden;

_zoom: 1;

}

.line_04 b{

background: #ddd;

margin-top: 12px;

float: left;

width: 26%;

height: 1px;

_overflow: hidden;

}

.line_04 span{

padding: 0 10px;

width: 32%;

float: left;

text-align: center;

}

.line_05{

letter-spacing: -1px;

color: #ddd;

}

.line_05 span{

letter-spacing: 0;

color: #222;

margin:0 20px;

}

小小分隔线 单标签实现
小小分隔线 巧用色实现
小小分隔线 inline-block实现
小小分隔线 浮动来实现
――――――――――― 小小分隔线 字符来实现――――――――――――
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值