@fengfeng
2014-08-21T04:59:00.000000Z
字数 1317
阅读 1218
html template
html
head
viewport
<!-- Mobile Viewport Fix: j.mp/mobileviewport & davidbcalhoun.com/2010/viewport-metatag
device-width : Occupy full width of the screen in its current orientation
initial-scale = 1.0 retains dimensions instead of zooming out if page height > device height
maximum-scale = 1.0 retains dimensions instead of zooming in if page width < device width
-->
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
<!-- Always force latest IE rendering engine (even in intranet) and load Chrome Frame if available
-->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!-- www.phpied.com/conditional-comments-block-downloads/ -->
<!-- URL: http://darrenhuskie.com/
This empty conditional comment hack is used to basically increase performance of a website. When conditional comments are used on a site, for example, for an IE6 conditional stylesheet, it will block further downloads until the css files are fully downloaded, hence increasing load time. To solve this issue, an empty conditional comment, like below, is used before any CSS is loaded in the document, and the problem will be solved!
-->
<!--[if IE]><![endif]-->
var preload;
if (/*@cc_on!@*/false) { // IE
preload = function (file) {
new Image().src = file;
};
} else {
preload = function (file) {
var obj = document.createElement('object'),
body = document.body;
obj.width = 0;
obj.height = 0;
obj.data = file;
body.appendChild(obj);
};
}