1.使用em布局
使用rem布局更好
2.footer的自適應(yīng)問題
3.函數(shù)表達(dá)式和函數(shù)聲明
- 用函數(shù)聲明創(chuàng)建的函數(shù)funDeclaration可以在funDeclaration定義之前就進行調(diào)用映皆;
而用函數(shù)表達(dá)式創(chuàng)建的funExpression函數(shù)不能在funExpression被賦值之前進行調(diào)用
用函數(shù)聲明創(chuàng)建的函數(shù)可以在函數(shù)解析后調(diào)用(解析時進行等邏輯處理)翩伪;
而用函數(shù)表達(dá)式創(chuàng)建的函數(shù)是在運行時進行賦值侨舆,且要等到表達(dá)式賦值完成后才能調(diào)用。 - Function Declaration 可以定義命名的函數(shù)變量栗恩,而無需給變量賦值透乾。
Function Declaration 是一種獨立的結(jié)構(gòu),不能嵌套在非功能模塊中磕秤∪槲冢可以將它類比為 Variable Declaration(變量聲明)。就像 Variable Declaration 必須以“var”開頭一樣市咆,F(xiàn)unction Declaration 必須以“function”開頭
找了很久的bug汉操,參考地球旋轉(zhuǎn)動畫
發(fā)現(xiàn)是因為布局問題
到底是什么影響了overflow呢?
測試一番發(fā)現(xiàn)是動畫影響了hidden rotation動畫(rotate-x/y)影響hidden
http://www.tuicool.com/articles/3UZRry
relative是占著位置的蒙兰,而margin-top是不占位置的磷瘤。
6.z-index和position的關(guān)系
7.動畫
transclude3d 效果 可以做出線條圖片移動效果
和用top做的區(qū)別?
經(jīng)過試驗發(fā)現(xiàn)搜变,效果相同采缚,但是如果我要修改它的距離頂端距離,用top定位的需要改兩個地方挠他,div樣式和動畫部分扳抽。如果修改transclude,只需要修改div樣式。
7.animation-delay要寫到animation后面才能生效
8.animate-fill-mode 設(shè)置動畫開始結(jié)束狀態(tài)贸呢。
9.http://www.w3school.com.cn/example/css3/demo_css3_transform-origin.html
10.絕對定位的居中镰烧,設(shè)置left 百分比 %50 再設(shè)置margin的寬度
11.使用多屏阿里提供移動端自適應(yīng)提供
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(); //阻止瀏覽器默認(rèn)行為 posStart = 0; posStart = event.originalEvent.targetTouches[0].pageY; //獲取起點坐標(biāo) 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) //獲取終點坐標(biāo) if (posStart - posEnd > 20) { alert("Cancel"); }; }); };
13.js里面有指針嗎
14.css里面的border其實是這樣的
15.字體問題