讨论会上谈到了这两者的关系,自认为有些许心得,却羞于开口,于是有了这篇博文。
……
<!doctype html> | |
<meta charset="utf-8" /> | |
<style type="text/css"> | |
canvas { | |
display: block; | |
} | |
</style> | |
<input id="file" type="file" accept="image/*" multiple /> | |
<canvas id="canvas"></canvas> | |
<script> |
<!-- 适应移动端start --> | |
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> | |
<meta name="apple-mobile-web-app-capable" content="yes" /><!-- 删除苹果默认的工具栏和菜单栏 --> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /><!-- 设置苹果工具栏颜色 --> | |
<meta name="format-detection" content="telphone=no, email=no" /><!-- 忽略页面中的数字识别为电话,忽略email --> | |
<!-- 启用360浏览器的极速模式(webkit) --> | |
<meta name="renderer" content="webkit" /> | |
<!-- 避免IE使用兼容模式 --> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | |
<!-- 针对手持设备优化,主要是针对一些老的不识别viewport的浏览器,比如黑莓 --> |