html5中怎么设置fieldset居中?

html5中怎么设置fieldset居中?,第1张

将fieldset的float:left去掉,不然会往左移的

设置左右magin为auto即可居中

fieldset {

    margin: 0 auto

    float: none

}

当然还有其他居中方法:用inline-block,position,还有flex都可以

<fieldset style="border-width: 1pxborder-color: #008000width:95%height:220">

<legend>系统使用说明</legend>

</fieldset>

其中border-width: 1px是边的粗细,border-color: #008000为边色,最好给他一个border-width: 1px这个值不然会显不出来想要的粗细的.


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/tougao/7892509.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-11
下一篇 2023-04-11

发表评论

登录后才能评论

评论列表(0条)

保存