浮动居中position:fixed;

底部这块  是居中的 这是个手机页面效果,用pc看是居中的

具体代码

最外层div 居中代码  position:fixed; left: 50%; bottom: 0; z-index: 1; margin-left: -320px; width: 640px; max-width: 640px;

背景的军绿色 我做的个图片 让图片下移 这样中间的圆上半部分就会显示出来

	<div id="" style="background: url({dede:global.cfg_templets_skin/}/images/in_02.jpg) left 40px repeat-x; height: 128px; position:fixed; left: 50%; bottom: 0; z-index: 1; margin-left: -320px; width: 640px; max-width: 640px; 
color: white; font-size: 1.5em; text-align: center;" class="g69"> <div id="" style="float: left; width: 20%; background: url({dede:global.cfg_templets_skin/}/images/bt1.png) center no-repeat; height: 38px; padding-top: 90px;"> <a href="/">网站首页</a> </div> <div id="" style="float: left; width: 20%; background: url({dede:global.cfg_templets_skin/}/images/bt2.gif) center no-repeat; height: 38px; padding-top: 90px;"> <a href="/">在线咨询</a> </div> <a href="tel:0101234567"> <div id="" style="float: left; width: 20%; height: 100%; background: url({dede:global.cfg_templets_skin/}/images/bt3.gif) ; background-size: 100%;"> <!--这里是中间那个圆圈图片,这里是关键 background之设置了图片大小和图片 没有设置任何其他属性--> </div> </a> <div id="" style="float: left; width: 20%; background: url({dede:global.cfg_templets_skin/}/images/bt4.png) center no-repeat; height: 38px; padding-top: 90px;"> <a href="/">预约挂号</a> </div> <div id="" style="float: left; width: 20%; background: url({dede:global.cfg_templets_skin/}/images/bt5.png) center no-repeat; height: 38px; padding-top: 90px;"> <a href="/">来院路线</a> </div> </div>

  

posted @ 2016-06-04 09:45  pro-pro  阅读(220)  评论(0)    收藏  举报