[关闭]
@fengfeng 2014-08-21T04:59:00.000000Z 字数 1317 阅读 1218

html template

html


head
viewport

  1. <!-- Mobile Viewport Fix: j.mp/mobileviewport & davidbcalhoun.com/2010/viewport-metatag
  2. device-width : Occupy full width of the screen in its current orientation
  3. initial-scale = 1.0 retains dimensions instead of zooming out if page height > device height
  4. maximum-scale = 1.0 retains dimensions instead of zooming in if page width < device width
  5. -->
  6. <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">

latest render engine

  1. <!-- Always force latest IE rendering engine (even in intranet) and load Chrome Frame if available
  2. -->
  3. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

conditional comment

  1. <!-- www.phpied.com/conditional-comments-block-downloads/ -->
  2. <!-- URL: http://darrenhuskie.com/
  3. 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!
  4. -->
  5. <!--[if IE]><![endif]-->

preload js

  1. var preload;
  2. if (/*@cc_on!@*/false) { // IE
  3. preload = function (file) {
  4. new Image().src = file;
  5. };
  6. } else {
  7. preload = function (file) {
  8. var obj = document.createElement('object'),
  9. body = document.body;
  10. obj.width = 0;
  11. obj.height = 0;
  12. obj.data = file;
  13. body.appendChild(obj);
  14. };
  15. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注