龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > php编程 >

网页自适应手机

时间:2014-07-22 14:49来源: 作者: 点击:
分享到:
网页自适应手机,根据浏览器或手机屏幕的宽度,自动调用不同的样式,显示不同的页面在浏览器里面,可以拖动浏览器的宽度,网页也会自使用屏幕宽度演示效果是我之前做的项目,
网页自适应手机,根据浏览器或手机屏幕的宽度,自动调用不同的样式,显示不同的页面

在浏览器里面,可以拖动浏览器的宽度,网页也会自使用屏幕宽度

演示效果是我之前做的项目,在web端和手机端都可以看,可能效果没有那么好
<!--mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">  
<!--[if lt IE 9]>     <script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>   <![endif]-->

<link rel="stylesheet" type="text/css" media="screen and (max-device-width: 728px)" href="/style/mindex.css" />
<link rel="stylesheet" type="text/css" media="screen and (min-width: 729px) and (max-device-width: 1024px)" href="/style/webs_index.css" />
<link rel="stylesheet" type="text/css" media="screen and (min-width: 1025px) " href="/style/web_index.css" />
<!--mobile end-->
精彩图集

赞助商链接