遇到的问题

2016-04-06  本文已影响28人  scarqin

1.使用em布局
使用rem布局更好

2.footer的自适应问题

3.函数表达式和函数声明

overflow失效
positon:relative 出现这个问题

找了很久的bug,参考地球旋转动画
发现是因为布局问题

img
到底是什么影响了overflow呢?
测试一番发现是动画影响了hidden rotation动画(rotate-x/y)影响hidden
http://www.tuicool.com/articles/3UZRry
top margin-top

relative是占着位置的,而margin-top是不占位置的。

6.z-index和position的关系
7.动画
transclude3d 效果 可以做出线条图片移动效果

Paste_Image.png

和用top做的区别?


Paste_Image.png

经过试验发现,效果相同,但是如果我要修改它的距离顶端距离,用top定位的需要改两个地方,div样式和动画部分。如果修改transclude,只需要修改div样式。

7.animation-delay要写到animation后面才能生效

例子

8.animate-fill-mode 设置动画开始结束状态。
9.http://www.w3school.com.cn/example/css3/demo_css3_transform-origin.html
10.绝对定位的居中,设置left 百分比 %50 再设置margin的宽度
11.使用多屏阿里提供移动端自适应提供
http://www.aliued.com/?p=3166
http://html5.9tech.cn/news/2013/0930/29204.html

12.jq获取滑动事件在页面上的位置
http://www.uw3c.com/jsviews/js52.html
http://www.cnblogs.com/aaronjs/p/4778020.html
http://www.07net01.com/zhishi/595771.html
http://www.jb51.net/article/46455.htm

function initEvent() { var btnElem = $(".page4"); var posStart = 0; var posEnd = 0 btnElem.on("touchstart", function(event) { event.preventDefault(); //阻止浏览器默认行为 posStart = 0; posStart = event.originalEvent.targetTouches[0].pageY; //获取起点坐标 console.log(posStart); }); btnElem.on("touchend", function(event) { event.preventDefault(); posEnd = 0; console.log(posEnd) posEnd = event.originalEvent.changedTouches[0].pageY; console.log(posStart - posEnd) //获取终点坐标 if (posStart - posEnd > 20) { alert("Cancel"); }; }); };

13.js里面有指针吗

14.css里面的border其实是这样的


border code

15.字体问题

Paste_Image.png
上一篇 下一篇

猜你喜欢

热点阅读