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
我解決問題的方法是完全刪除字段集邊框,絕對定位圖例元素.你想做什么的問題是每個瀏覽器都有所不同.
總結
以上是生活随笔為你收集整理的html主题居中用什么命令,html – 如何居中的元素 – 使用什么而不是align:center属性?...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: p20适配鸿蒙系统,适配鸿蒙OS,必须要
- 下一篇: 上海2021高考查成绩查询,2021年上