html主题居中用什么命令,html – 如何居中的元素 – 使用什么而不是align:center属性?...

假设你的标记看起来像这样:

Person:

Name:

Email:

Date of birth:

你的CSS应该是这样的:

legend {

margin:0 auto;

}

这最简单

哦,亲爱的…当涉及到浏览器的兼容性时,你可能已经选择了CSS中最困难的事情.卡梅伦·亚当斯表示最好

Probably the only difficulty in

styling semantic forms is the legend

tag. It is insufferably variable

across browsers. In Mozilla,the

legend tag is not left-indented from

the body of the fieldset,in IE and

Opera it is. In Mozilla,the legend

tag is positioned in between the

fieldset’s border and its content,in

IE and Opera it is positioned inside

the content. This makes it very hard

to move the legend inside the fieldset

border,or position it flush to the

left of the fieldset,as you get

varying effects across browsers

您可以阅读更多关于他在Fancy Form Design Using CSS上如何表达风格的内容.

我解决问题的方法是完全删除字段集边框,绝对定位图例元素.你想做什么的问题是每个浏览器都有所不同.

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值