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"? >
<! PUBLIC DOCTYPE HTML "-//WAPFORUM/Mobile/1.0/EN/DTD XHTML" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd" >
<HTML XMLNS="http://www.w3.org/1999/xhtml" >
<Head>
<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;

}};
</script>
</head>
<Body>
<Canvas id='c' ></canvas>

ordinary version </body>
</html>

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',
'up.link', '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=http://www.jb51.net//web/false) {
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