大神帮我看看这段代码。

rexmr 2016-09-21 10:22:29
http://120.24.167.182/

在360浏览器看不会居中的(现在是偏向于左边),
但是在IE和其他浏览器随着浏览器大小拖动它会居中。
本来想实现网页随着浏览器大小变动居中,谁知道搞着搞着,
现在在IE能居中,却在360浏览器不能居中,
反而左边空了一大截,唉。。大神帮我看看。确实绞尽脑汁了。

...全文
350 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
KK3K2005 2016-09-22
  • 打赏
  • 举报
回复
position:absolute; left:50%; top:0; transform:translate(-50%,0) ---》 position:absolute; left:0 right:0 margin:0 auto; 360你肯定进入了老ie模式
rexmr 2016-09-22
  • 打赏
  • 举报
回复
<html> <head> <title>XXXXXXX</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <style type="text/css"> * { margin:0; padding:0;} #center { position:absolute; left:50%; top:0; transform:translate(-50%,0) } </style> <body style="overflow:-Scroll;overflow-x:hidden; position:relative; text-align:center; width:100%; height:100%;" bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <div id="center" style="width:1920px;height:1080px; overflow:hidden;"> <div style="float:left;"><img alt="" src="images/index_01.jpg" /></div> <div style="float:left;"><img alt="" src="images/index_02.jpg" /></div> <div style="float:left;"><img alt="" src="images/index_03.jpg" /></div> <div style="float:left;"><img alt="" src="images/index_04.jpg" /></div> <div style="float:left;"><img alt="" src="images/index_05.jpg" /></div> <div style="float:left;"><img alt="" src="images/index_06.jpg" /></div> <div style="float:left;"><img alt="" src="images/index_07.jpg" /></div> <div style="float:left;"><img alt="" src="images/index_08.jpg" /></div> <div style="float:left;"><img alt="" src="images/index_09.jpg" /></div> <div style="float:left;"><img alt="" src="images/index_10.jpg" /></div> <div style="float:left;"><img alt="" src="images/index_11.jpg" /></div> <div style="float:left;"><img alt="" src="images/index_12.jpg" /></div> <div style="float:left;"><img alt="" src="images/index_13.jpg" /></div> <div style="float:left;"><img alt="" src="images/index_14.jpg" /></div> <div style="float:left;"><img alt="" src="images/index_15.jpg" /></div> <div style="float:left;"><img alt="" src="images/index_16.jpg" /></div> <div style="float:left;"><img alt="" src="images/index_17.jpg" /></div> <div style="float:left;"><img alt="" src="images/index_18.jpg" /></div> </div> </body> </html>
失控的比卡丘 2016-09-22
  • 打赏
  • 举报
回复
你发的这个地址别人看不到的
rexmr 2016-09-22
  • 打赏
  • 举报
回复
引用 7 楼 xuzuning 的回复:
不要好像,我刚才又看了你的链接,你并没有把 BOM 头去掉!
是缓存。我虽然改了FTP空间里面的文件,但是页面不知道为什么没刷新得出来。 不过我发现我这个问题在某个360论坛得到解决办法了。 是因为360浏览器的兼容模式的原因,可能过滤了一些CSS的什么。。 <meta name="renderer" content="webkit|ie-comp|ie-stand"> 加上这个就好了。
xuzuning 2016-09-22
  • 打赏
  • 举报
回复
不要好像,我刚才又看了你的链接,你并没有把 BOM 头去掉!
rexmr 2016-09-22
  • 打赏
  • 举报
回复
引用 5 楼 xuzuning 的回复:
把你页面文件的 BOM 头去掉
好像也没有用哦。。。
xuzuning 2016-09-22
  • 打赏
  • 举报
回复
把你页面文件的 BOM 头去掉
rexmr 2016-09-22
  • 打赏
  • 举报
回复
引用 3 楼 KK3K2005 的回复:
position:absolute; left:50%; top:0; transform:translate(-50%,0) ---》 position:absolute; left:0 right:0 margin:0 auto; 360你肯定进入了老ie模式
还是不行哦,大神。可以帮我编辑一下CSS么?

61,112

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧