|
1.关于autoStartUp进一步的测试:
有些机型可以,有些不行,这个暂且这样吧
2.关于效率的问题,我特意做了个demo,在各个机器上测试了一下,都发现有问题,加了个定时器可以看到效果,特发代码和演示apk
marquee 是一个过时的标签,这个我也知道,也可以用jquery.liMarquee.js来实现,效果是一样的,
不同的机器看到的效果略有差异,动画会动时间的影响,差一点的机器看到的效果更明显,总体来说就是“卡”,同样的代码用Hbuild编译的要好得多,希望多完善一下,多测一下各种性能的机器,不要不了了之。
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=no,width=device-width,initial-scale=1.0" />
- <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
- <title></title>
- <style type="text/css">
- html,
- body {
- height: 100%;
- background-size: 100% 100%;
- background-color:black;
- }
-
- @-webkit-keyframes systitle1 {
- from {
- text-shadow: 0 0 10px #fff,
- 0 0 20px #fff,
- 0 0 30px #fff,
- 0 0 40px #228DFF,
- 0 0 70px #228DFF,
- 0 0 80px #228DFF,
- 0 0 100px #228DFF,
- 0 0 150px #228DFF;
- }
- to {
- text-shadow: 0 0 5px #fff,
- 0 0 10px #fff,
- 0 0 15px #fff,
- 0 0 20px #228DFF,
- 0 0 35px #228DFF,
- 0 0 40px #228DFF,
- 0 0 50px #228DFF,
- 0 0 75px #228DFF;
- }
- }
- .hd_lab {
- -webkit-text-fill-color: red;
- -webkit-text-stroke-color: white;
- -webkit-text-stroke-width: 1.00px;
- font-size: 30px;
- font-weight: bold;
- white-space: nowrap;
- line-height: 110px;
- color: lightyellow;
- -webkit-transition: all 0.5s;
- -webkit-animation: systitle1 1.5s ease-in-out infinite alternate;
- }
- </style>
- </head>
- <body>
-
- <span id="hd_lab" class="hd_lab">我们的国家</span>
- <span id="hd_time" style="color:white; font-size:30px">16:31</span>
-
- <marquee behavior="scroll" direction="up" scrolldelay="500">
- <p style="color:red">关于动画执行效率:如下面的代码,marquee的滚动断断续续,其它地方的js代码执行也会受到影响,js与下面的动画不能同时执行,有先有后,有触摸和没触摸时效果又不一样,在其它应用中也有遇到,我在手机浏览器上试了一下没有问题,没有办法,又找到了HBuild中同样的代码编译了个app,也没有问题,我发现这是个很大的Bug,会影响用户的选择,希望能尽快解决。</p>
- </marquee>
-
- </body>
- <script type="text/javascript">
- Date.prototype.Format = function(fmt) { //author: meizz
- var o = {
- "M+": this.getMonth() + 1, //月份
- "d+": this.getDate(), //日
- "h+": this.getHours(), //小时
- "m+": this.getMinutes(), //分
- "s+": this.getSeconds(), //秒
- "q+": Math.floor((this.getMonth() + 3) / 3), //季度
- "S": this.getMilliseconds() //毫秒
- };
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
- for (var k in o)
- if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
- return fmt;
- }
- //更新显示页面时间
- function updatesj() {
- var d = new Date();
- document.getElementById("hdTime").innerText = d.Format("hh:mm:ss");
- }
- apiready = function() {
- setInterval("updatesj()", 1000);
- };
- </script>
- </html>
复制代码
|
-
-
-
|