含有间距的td处理方式

9 篇文章 0 订阅

含有间距的td处理方式:

一、如图:

这里写图片描述

二、html:


<table cellpadding="0" cellspacing="0" class="score_point">
    <tr class="th">
        <td><span>Technical Skills</span></td>
        <td><span>Business Skills</span></td>
        <td><span>People Skills</span></td>
        <td><span>Leadership Skills</span></td>
        <td><span>Integration</span></td>
    </tr>
    <tr class="descri">
        <td><span>Ability to make sensible/informed sugges</span></td>
        <td><span>Ability to make sensible/informed sugges</span></td>
        <td><span>Ability to make sensible/informed sugges</span></td>
        <td><span>Ability to make sensible/informed suggesAbility to make sensible/informed sugges</span></td>
        <td><span>Ability to make sensible/informed sugges</span></td>
    </tr>
    <tr class="score">
        <td>
            <input type="text" placeholder="score  (full mark :5) ">
        </td>
        <td>
            <input type="text" placeholder="score  (full mark :5) " class="ok" value="5">
        </td>
        <td>
            <input type="text" placeholder="score  (full mark :5) ">
        </td>
        <td>
            <input type="text" placeholder="score  (full mark :5) ">
        </td>
        <td>
            <input type="text" placeholder="score  (full mark :5) ">
        </td>
    </tr>
</table>

三、css:


.score_point{font-family: 'Arial';}
.score_point .th td, .score_point .score input{text-align: center;}
.score_point .th td{background-color: #E3E3E3;color: #333;}
.score_point td span, .score_point .score input{border: 1px #eee solid;display: block; margin:1px;padding: 5px;width: 164.5px;}
.score_point .descri{color: #666;}
.score_point .descri span{height: 90px;overflow: auto;word-break: break-all;}
.score_point .score input{line-height: 24px;background-color: transparent;}
.score_point .score input:focus{box-shadow: 0 0 2px 1px #1FA0E2 inset;color: #1FA0E2;font-weight: bold;}
.score_point .score .ok{color: #1FA0E2;}

四、解析:

由于td的margin无效,所以在td内容再添加一层dom,然后用margin做间距。


ps:鉴于个人经验有限,所有观点,如有异议,请直接回复讨论(请勿发表攻击言论)。
加入QQ群209952809(需回答问题,答案为csdn);群聊更快解决问题,更happy。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值