当前位置:Gxlcms > html代码 > div块状居中显示_html/css_WEB-ITnose

div块状居中显示_html/css_WEB-ITnose

时间:2021-07-01 10:21:17 帮助过:96人阅读












代码如上,我要的功能 八个小块居中显示 初始每行4个 窗口缩小变大 当中的小块也要居中 小块大小固定180*180 css调试了很久 愣是没调出来。。。。


回复讨论(解决方案)

木有人啊?????

  1. <title></title> <style type="text/css"> #divbg { width: 98%; margin-left: auto; margin-right: auto; } #divbg li { float: left; background: rgb(231,231,231); width: 180px; height: 180px; font-size: 20px; list-style-type: none; cursor: hand; line-height: 40px; text-align: center; cursor: pointer; margin-bottom: 2%; margin-top: 4%; margin-left: 5.5%; margin-right: 5.5%; } #box { margin:0 0 0 0; position: absolute; } </style>
你不觉得这样好看些吗

赞版主 楼上正解

人气教程排行