php设置两个按钮的间距,DIV内两个按钮之间的间距

6 个答案:

答案 0 :(得分:9)

在css中:

.Container input{ /* You Can Name it what you want*/

margin-right:16px;

}

.Container input:last-child{

margin-right:0px;

/*so the last one dont push the div thas giving the space only between the inputs*/

}

将该css类提供给div:

答案 1 :(得分:3)

您可以按如下方式使用margin-right:

Button 1

Button 2

Button 3

答案 2 :(得分:0)

这可能是你的情景:

每个提交按钮的下一个边距为16px。

答案 3 :(得分:0)

这是一个JSX示例:使用右边距css标签

-`

Buy this

`

'

Buy that

`

答案 4 :(得分:0)

设置div,浮动按钮,然后在第一个按钮上添加边距

CSS:

div a {

float: left;

}

div .button_1 {

margin-right: 16px;

}

答案 5 :(得分:0)

您只需在输入标签上添加保证金即可。查看

input[type="submit"]{margin:0 16px;}

input[type="submit"]:last-child{margin-right:0;} /*Remove the margin from last input field*/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值