为了账号安全,请及时绑定邮箱和手机立即绑定

关于CSS的padding

关于CSS的padding

放开个女仔 2017-01-18 16:24:50
nav > a { font-size: 24px; line-height: 73px; display: block; float: left; width: 110px; height: 73px; text-align: center; color: #fff; }nav > a:nth-child(1) { background: #433b90; }nav > a:nth-child(2) { background: #017fcb; }nav > a:nth-child(3) { background: #78b917; }nav > a:nth-child(4) { background: #feb800; }nav > a:nth-child(5) { background: #f27c01; }nav > a:nth-child(6) { background: #d40112; }nav > a:hover,nav > a.active { padding-bottom: 7px; }上面用CSS控制这个效果,为什么反而是加了padding-bottom之后会出现点击的时候多出下面的一小截?padding-bottom不是代表给他多一个下边距吗?
查看完整描述

2 回答

?
侠客岛的含笑

TA贡献552条经验 获得超285个赞

margin-bottom吧

查看完整回答
反对 回复 2017-01-23
  • 2 回答
  • 0 关注
  • 1379 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信