<!DOCTYPE html>

<html>

<head>

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0">

<style>

  

body { margin:0; font-size: 13px; font-family: sans-serif; color:#333; line-height: 1.5; background: #fff;}
div{ margin:0;}
a{-webkit-tap-highlight-color:transparent; color:inherit;} .jesgoo-ad-container { width: 100%; height: 100%; overflow: hidden;}
.jesgoo-content { position: absolute; left: 0; top: 0; width: 100%; height: 100%; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -o-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; text-decoration: none; } .jesgoo-icon { float: left; border: none; width: 36px; height: 36px; margin:6px 0 0 12px; border-radius: 6px; overflow: hidden;}
.jesgoo-text{ float: left; padding-left: 10px; padding-top: 6px; width: 210px; overflow: hidden;}
.jesgoo-text.text { width: 260px; } .jesgoo-title, .jesgoo-desc { white-space: nowrap; overflow: hidden; text-overflow:ellipsis;} .jesgoo-title { font-weight: 800;}
.jesgoo-desc { color: #666; font-size: 12px; }
.jesgoo-desc marquee{ /*text-indent: -180px;*/} .jesgoo-btn{ position: absolute; width: 40px; line-height: 24px; text-align: center; right: 12px; top: 50%; margin-top: -12px; color:#fff; font-style: normal; border-radius: 4px; background: #2e97ea; display: none;}

  </style>

<script type="text/javascript">

    

window.onload = function(){

var containerId = 'jesgoo-id-container';
var resetSize = function () {
var containerEle = document.getElementById(containerId);
var win = window;
var winW = win.innerWidth;
var winH = win.innerHeight;
var fzW, fzH;
if (winW / winH < 5 / 2) {
fzW = winW / 300 * 20; fzH = 1000;
}
else { fzW = 1000;
fzH = winH / 96 * 20;
}
var fz = fzW > fzH ? fzH : fzW; containerEle.style.fontSize = fz + 'px';
};
//resetSize(); var aEle = document.getElementById("jesgoo-link");
var attrJSON = aEle.getAttribute("extra");
var attrObj = eval("("+ attrJSON +")");
var btn = document.getElementById('jesgoo-btn'); if(attrObj.act == 2){
btn.innerHTML = "下载";
}else{
btn.innerHTML = "查看";
}
btn.style.display = "block" }

   </script>

</head>

<body>

<div id="jesgoo-id-container" class="jesgoo-container">

<a target="_blank" id="jesgoo-link" class="jesgoo-content" style="text-decoration: none;" href=http://www.baidu.com extra="{'act':1,'pkg':'','title':'','adid':'0','durl':[''],'iurl':[''],'aurl':['']}">

<div class="jesgoo-text text">

<div class="jesgoo-title">分享:关键时刻不行怎么办</div>

<div class="jesgoo-desc"><marquee behavior="scroll" direction="left">只需一招 给她夜夜惊喜</marquee></div>

</div>

<i id="jesgoo-btn" class="jesgoo-btn">下载</i>

</a>

  </div>

</body>

</html>

以上这个物料在ios 320*50的UIWebView iphone的设备上(iPhone5 iPhone4)上右侧有下载或查看按键

但是 这个物料在ios 320*50的UIWebView ipad的设备上 没有看到右侧按键

原因是下面的 content="width=device-width, user-scalable=no, initial-scale=1.0" 设置的content的宽为设备的宽度 button的位置是做了对右偏移的控制 在ipad上device-width 是728 实际button的x位置是716 但是webview 只有320宽度,所以看不到了。使用中注意这个。

<html>

<head>

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0">

<style>

html5 中meta中 content=width=device-width注意的更多相关文章

  1. <head>中<meta name="viewport" content="width=device-width,initical-scale=1"的作用>

    <meta name="viewport" content="width=device-width,initical-scale=1"的作用> co ...

  2. HTML5移动开发中的meta与link

    meta HTML5移动开发中的一些webkit专属头部标签,能够帮助浏览器更好的解析HTML代码,从而为HTML5移动开发提供更好的前端表现与体验 viewport网页缩放 1 <meta n ...

  3. HTML5头部标签中<meta>常用信息

    整理一些平时常用的,方便查阅 <!-- 字体编码 --> <meta charset="utf-8" /> <!-- 关键字 --> <m ...

  4. 如何理解VB窗体中的scale类属性及width height属性之间的关系

    如何理解VB窗体中的scale类属性及width height属性之间的关系 VB中的SCALEHIEGT,SCALEWIDTH,与窗体中的WIDTH,HEIGHT的区别及关系是许多VB初学者难以理解 ...

  5. HTML5在canvas中绘制复杂形状附效果截图

    HTML5在canvas中绘制复杂形状附效果截图 一.绘制复杂形状或路径 在简单的矩形不能满足需求的情况下,绘图环境提供了如下方法来绘制复杂的形状或路径. beginPath() : 开始绘制一个新路 ...

  6. HTML中<meta>标签如何正确使用

    HTML中<meta>标签如何正确使用 如果我们在浏览器中按下F12或者Ctrl+shift+J,便可以打开开发者工具,在element中即可看到<head>元素中有不少< ...

  7. 我刚知道的WAP app中meta的属性

    之前我一直做的都是WEB前端开发,来北京以后面试了一个移动前端开发,WAP前端开发. 其实在原来公司的时候也做过这方面的开发,可面试的时候面试官问我,要想强制让文档与设备的宽度保持1:1,mate标签 ...

  8. 我刚知道的WAP app中meta的属性(转载)

    之前我一直做的都是WEB前端开发,来北京以后面试了一个移动前端开发,WAP前端开发. 其实在原来公司的时候也做过这方面的开发,可面试的时候面试官问我,要想强制让文档与设备的宽度保持1:1,mate标签 ...

  9. html中meta标签及用法理解

    自己一直想成为高级前端开发工程师,而自学.奈何最近感觉自学收效甚微,一度迷茫. 不破不立,打算改变这样的状态. 春节后上班第一天,今年打算好好实现自己的前端梦想. 重新整理.总结前端技术. 废话,就不 ...

随机推荐

  1. editplus 替换换行 excel 表格 拼装sql语句技巧

    这样的数据 放到sql中的in 语句中的时候格式需要换行  加上‘,’这样的内容. 操作内容: 用editplus 进行操作.Ctrl+H    查找的地方输入 \n  ,替换的地方填写 ','   ...

  2. 144. Binary Tree Preorder Traversal

    Given a binary tree, return the preorder traversal of its nodes' values. For example:Given binary tr ...

  3. [JSP] c:forEach 输出序号 每行自动生成序号

    关键在于<c:forEach>的varStatus属性,具体代码如下: <table width="500" border="0" cells ...

  4. leetcode 99 Recover Binary Search Tree ----- java

    Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing ...

  5. JavaWeb学习记录(十七)——JSP九大隐式对象

    public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOE ...

  6. 神奇的输入 while(cin>>....)如何在遇见换行之后进入下一层循环读入

    cin>>m>>n; ;i<=m;i++) { ; char ch=' '; ) //在遇到换行之后进入下一层循环读入. { x++; cin>>c[x]; ...

  7. hdu 5351 规律+大数

    题目大意:定义了一种fib字符串,问第n个fib串的前m个字母前后相等串的最大长度,大约就是这样的 其实主要读完题意的时候并没有思路,但是列几个fib字符串就会发现,除了fib1以外,所有串的前面都是 ...

  8. js类型判断

    console.log('---------------------'); var a="string"; console.log(a); //string var a=1; co ...

  9. web开发注意的问题

    1.<input type="submit" value="提交">    将表单提交<form action="login.jsp ...

  10. linux包之iproute之ss命令

    概述 [root@localhost ~]# rpm -qa|grep iprouteiproute-2.6.32-31.el6.x86_64 当服务器的socket连接数量变得非常大时,无论是使用n ...