最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

body大于1200px,分辨率为1024*768,显示器视图怎么居中_html/css_WEB-ITnose

来源:懂视网 责编:小采 时间:2020-11-27 16:33:16
文档

body大于1200px,分辨率为1024*768,显示器视图怎么居中_html/css_WEB-ITnose

body大于1200px,分辨率为1024*768,显示器视图怎么居中_html/css_WEB-ITnose: body {width:1257px;margin:auto;} #head{width:1257px;height:102px;background:url(./images/guagua_01.jpg) no-repeat;} #menu{width:1257px;height:38px;background:url(./images/banner.jpg) repeat-x;} #soso{width:1257px;height:40px;background
推荐度:
导读body大于1200px,分辨率为1024*768,显示器视图怎么居中_html/css_WEB-ITnose: body {width:1257px;margin:auto;} #head{width:1257px;height:102px;background:url(./images/guagua_01.jpg) no-repeat;} #menu{width:1257px;height:38px;background:url(./images/banner.jpg) repeat-x;} #soso{width:1257px;height:40px;background


body大于1200px 显示器打开默认居左,要用什么元素才能居中显示内容?text-align:center用后是文本等内容居中,而不是视图居中。


回复讨论(解决方案)

margin:0 auto;

body {width:1257px;margin:0 auto;}

这个恐怕只能控制滚动条到中间~
或者定义左边坐标为负值,就是把部分显示内容移出屏幕外不显示

为毛给body加宽度啊 ......

这个恐怕只能控制滚动条到中间~
或者定义左边坐标为负值,就是把部分显示内容移出屏幕外不显示
body {width:1257px;margin:0 auto;background: none repeat scroll 0 0 #FFFFFF;overflow-x:hidden ;}
#juzhong {float:left; height:50%; margin-left:-120px;}
内容外加个div ,用了可以,谢谢了

*{padding:0;margin:0;}
min-width:

文档

body大于1200px,分辨率为1024*768,显示器视图怎么居中_html/css_WEB-ITnose

body大于1200px,分辨率为1024*768,显示器视图怎么居中_html/css_WEB-ITnose: body {width:1257px;margin:auto;} #head{width:1257px;height:102px;background:url(./images/guagua_01.jpg) no-repeat;} #menu{width:1257px;height:38px;background:url(./images/banner.jpg) repeat-x;} #soso{width:1257px;height:40px;background
推荐度:
标签: 显示 居中 分辨率
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top