mobile site to implement at least some of the basic functions:
code is as follows:

<Meta name="viewport" content="width=device - width"/>

, regarding the font, we'll use ems or ex as the unit is good.
code is as follows:

<? The XML version="1.0" encoding="utf-8"? >
<Meta HTTP - equiv="content-type" Content="text/HTML; charset=utf-8"/>
<Meta name="viewport" content="width=device - width"/>
<Title> The version control </title>
<The script type="text/javascript" >
window. The onload=function () {
//check whether support js
the try {//check whether support html5
the document. The getElementById (" c "). The getContext (" 2 d "); .
the document location='support html5 version of the link;
} the catch (e) {//or to support the js version
the document. The location='supports js version;

<Canvas id='c' ></canvas>

ordinary version </body>

code is as follows:

PHP function checkmobile () {
global $_G;
$mobile=array ();
static $mobilebrowser_list=array('iphone', 'android', 'phone', 'mobile', 'wap', 'netfront', 'java', 'opera mobi', 'opera mini',
'ucweb', 'windows ce', 'symbian', 'series', 'webos', 'sony', 'blackberry', 'dopod', 'nokia', 'samsung',
'palmsource', 'xda', 'pieplus', 'meizu', 'midp', 'cldc', 'motorola', 'foma', 'docomo', 'up.browser',
'', 'blazer', 'helio', 'hosin', 'huawei', 'novarra', 'coolpad', 'webos', 'techfaith', 'palmsource',
'alcatel', 'amoi', 'ktouch', 'nexian', 'ericsson', 'philips', 'sagem', 'wellcom', 'bunjalloo', 'maui', 'smartphone',
'iemobile', 'spice', 'bird', 'zte-', 'longcos', 'pantech', 'gionee', 'portalmmm', 'jig browser', 'hiptop',
'benq', 'haier', '^lct', '320x320', '240x320', '176x220');
$useragent=strtolower ($_SERVER [' HTTP_USER_AGENT ']);
the if (($v=dstrpos ($useragent, $mobilebrowser_list, true))) {
$_G [' mobile ']=$v;
return true;

} $brower=array (' mozilla ', 'chrome', 'safari', 'opera', 'm3gate', 'winwap', 'openwave', 'myop');
the if (dstrpos ($useragent, $brower); return false
$_G/' mobile '=' unknown ';
the if ($_GET [' mobile ']==='yes') {
return true;
} else {
return false;

function dstrpos ($string, & $arr, $returnvalue= {
the if (emptyempty ($string)) return false;
the foreach ((array) $arr as $v) {
the if (strpos ($string, $v)!==false) {
$return $returnvalue=? $v: true,
the return $return;

return false;

} var_dump (checkmobile ());//return true if it is a mobile end, otherwise false
? >

This concludes the body part