1.css的盒子模型
包含元素內容content
、內邊距padding
、邊框border
、外邊距margin
box-sizing
:border-box
;content-box
;inherit
;
1)content-box
:總寬度=margin+border+padding+width
,即為標準模型;
2)border-box
:總寬度=margin+width
,即為ie模型;
3)inherit
:繼承父元素的border-sizing
屬性。
2.ajax的readystate幾種狀態
0
——初始化
1
——載入
2
——載入完成
3
——解析
4
——完成
3.常見的post提交資料方式對應的content-type取值
4.清除浮動的幾種方法
1)父級div
定義偽類:after
和zoom
`.clearfloat::after
.clearfloat `
2)在結尾處新增空div
標籤clear:both
3)父級div
定義height
4)父級div
定義display:table
5)父級div
也一起浮動
6)父級div
定義overflow:auto/hidden
(必須定義width
或zoom:1
,同時不能定義height
,瀏覽器會自動檢查浮動區域的高度)
5.webpack解析es6用的外掛程式
babel-loader
6.移動端上click事件在某些瀏覽器有沒有遇到延遲的問題
1)靜止縮放
或
2)引入`fastclick.js
window.addeventlisten
er(function(),false)`
7.http的快取機制
1)強制快取:當所請求的資料在快取資料庫中尚未過期時,不與伺服器進行互動,直接使用快取資料庫中的資料。
expire / cache-control
2)協商快取:從快取資料庫中取出快取的標識,然後向瀏覽器傳送請求驗證請求的資料是否已經更新,如果已更新則返回新的資料,若未更新則使用快取資料庫中的快取資料。
刷前端面經筆記(十二)
1.以下遞迴函式存在棧溢位的風險,請問如何優化?function factorial n 解答 function factorial n 2.請實現乙個計算最大公約數的函式 function greatestcommondivisor a,b greatestcommondivisor 8,12 4...
刷前端面經筆記(十二)
1.以下遞迴函式存在棧溢位的風險,請問如何優化?function factorial n 解答 function factorial n 2.請實現乙個計算最大公約數的函式 function greatestcommondivisor a,b greatestcommondivisor 8,12 4...
刷前端面經筆記(十二)
1.以下遞迴函式存在棧溢位的風險,請問如何優化?function factorial n 解答 function factorial n 2.請實現乙個計算最大公約數的函式 function greatestcommondivisor a,b greatestcommondivisor 8,12 4...