每日笔记20160223

1.webview中给body设固定高度并overflow:hidden无效

解决方法:

  需要将body下面的所有内容再用一层div包裹起来,例:

<body>
    <div class="wrap">
    //content.......
    </div>
</body>

  此时对className=wrap的div设固定高度且overflow:hidden方才有效

2. 对于安卓部分4.4+以上机型和IOS机型,需要等待用户的交互动作后才能播放音乐,也就是说没法实现自动播放音乐。(但微信是可以的,个人理解是微信webview内核有做过专门的处理,如果有知道确切原因的还请麻烦指正)

解决方法:  当用户第一次触碰(最好用touchend,touchstart还有部分机型不兼容)页面时,触发播放音乐

3. 微信客户端自带了一个客户端Banner,高度为64px,所以在针对机型做屏幕兼容性的时候,高度记得减去64px。

比如:

  • iphone4:320*480 =》 320*416
  • iphone5:320*568 =》 320*504
  • iphone6:375*667 =》 375*603
  • iphone6+:414*736 =》 414*672

4. 之前做页面的时候,出现部分机型无法显示CSS引入的图片。

后来排查后发现是由于使用background属性引入图片导致的,改为用background-image即可。

有问题写法:

background: url("../xxx.jpg") no-repeat; 

改进后写法:

background-image: url("../xxx.jpg");
background-repeat: no-repeat;

  

时间: 2024-11-04 23:35:50

每日笔记20160223的相关文章

[2016-2-29OMG美语每日笔记-What do you say to start small talk with someone you haven&#39;t seen in a minute?

坚持~坚持~坚持~! How have you been? 你最近怎么样? in a minute 很久 Hey Nina! I haven't seen you in a minute!How have you been? Hey!Nina!我们好久没见了.你最近怎么样? Hangin' in there 坚持~挺着 adjustment 适应 I'm hangin' in there.I just move back home and had to switch jobs,so that's

[2016-2-22]OMG美语每日笔记-What would you say to someone you haven&#39;t seen in 10years?at high shcool or union?

坚持~坚持~坚持~! How have you been? 你怎么样啊 Hi Gina!How have you been?I haven't seen you in 1n years! 嗨Gina !你怎么样啊?我都10年没见过你了! I can't believe it's been that long.Time really flies! 我真不敢相信都这么长时间了.时间过得真快 What do you do now? 你现在做什么? So tell me what you've been

[2016-1-26]OMG美语每日笔记-What&#39;s your New Year&#39;s resolutions?

坚持学习英语,OMG口语非常长不错,坚持每天整理.学英语坚持最重要,学英语坚持最重要,学英语坚持最重要说三遍! New year's resolutions 新年心愿 I make list of New Year's resolutions every year!And they don't usually last very long. 我每年都陈列一个新年愿望清单!一般都坚持不了长时间. health goals. 健康目标 But this year I have a lot of he

[2016-3-18]OMG美语每日笔记-How do you get on someone&#39;s radar?How do you make them notice you?

坚持~坚持~坚持~! attract someone's attention 吸引某人的注意力 I hava a huge crush on this new guy at work but I' don't know how to attract his attention.I wish I wasn't so shy. 我超喜欢我单位新来的那个人.但是我不知道怎么吸引他的注意力.我希望我没有这么害羞. to be invisible to someone. 不被某人注意 I'm I invi

[2016-4-27]OMG美语每日笔记-What would make you feel like you&#39;re super stoked?

坚持~坚持~坚持~! So excited 好兴奋 I'm seeing Taylor Swift in concert next week! I am so excited! 我下周就要去看Taylor Swift的演唱会了,好兴奋! super stoked 超激动! So am I! I am super stoked to hear her sing her new album in person.I love all of her new songs! 我也是啊!我能亲耳听到她唱她的新

[2016-3-31]OMG美语每日笔记-Have you ever opened up to someone?Do you think it&#39;s pretty hard of kind easy?

坚持~坚持~坚持~! It's not easy to tell someone that you love them. 向别人表达你的爱很不容易 I've been dating a guy for a while and don't know how to tell him how I fell.It's not easy to tell someone that you love them 我已经和一个人约会很久了.但是我不知道怎么告诉他我的感觉.向别人表达你的爱很不容易. Open up

每日笔记20150608

今日笔记: 1.键盘监听方向键: 2.获取网页屏幕可见区域高宽: 3.获取对象位置信息. 1.键盘监听方向键,上下左右对应的键值分别为38.40.37.39 document.onkeydown = function(e) { var key = window.event ? e.keyCode : e.which; switch (key) { case 37: //left //TODO break; case 38: //up //TODO break; case 39: //right

[2015-12-25]OMG美语每日笔记-Go green

坚持学习英语,OMG口语非常长不错,坚持每天整理.学英语坚持最重要,学英语坚持最重要,学英语坚持最重要说三遍! Go green  环保生活 I've been thinking about ways I cloud go green .What can I do to be more environmentally friendly? 我最近在想怎样才能过绿色生活?我应该怎么才能更环保呢? reuse 循环使用 One way I've gone green is by reusing pla

[2016-3-18]OMG美语每日笔记-Hava you ever felt so devastated after not being chosen by a club you really want to be in.

坚持~坚持~坚持~! I am totally devastated. 我都要快崩溃了. I wasn't chosen to be in our school choir.I love singing and that is all I want to do.I am totally devastated. 我没有选上学校的合唱队,我喜欢唱歌,而且我只想唱歌.我都要崩溃了 That's such a shame. 太可惜了. That's such a shame.I know how muc