Last active
August 24, 2017 01:54
-
-
Save ifyour/e815eee10b2714ba028371e0d10202c0 to your computer and use it in GitHub Desktop.
手机横屏友好提示// source http://jsbin.com/farahap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>手机横屏友好提示</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | |
</head> | |
<body> | |
<script src="http://ossweb-img.qq.com/images/js/landscape/landscape.min.js"></script> | |
<script> | |
var landscape = new landscape({ | |
mode: 'portrait',//portrait,landscape | |
prefix: 'Shine', | |
}); | |
</script> | |
<!-- 参数如下: | |
pic:图片地址 如'http://ossweb-img.qq.com/images/js/landscape/landscape.png', | |
picZoom:图片缩放比例 如 2, | |
mode:页面模式,如'portrait'或'landscape', | |
bgcolor:背景色,如 '#000', | |
txt:提示文字, 如 '为了更好的体验,请将手机/平板竖过来', | |
txtColor: 提示文字颜色 如'#ffd40a', | |
prefix:前缀 如 'Shine' zIndex:层级覆盖z-index值 --> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment