Weitere ähnliche Inhalte
Ähnlich wie 深入淺出RWD自適應網頁設計 (20)
深入淺出RWD自適應網頁設計
- 12. 1) 瀏覽器兼容的問題
2) 效能問題
IE8 不支援media queries, IE6不支援max(min)-width,
這兩大項是RWD的CSS必用規則
解法:使用網路上能降級的js套件或多花心思自寫css hack
網站結構較複雜,通常有大量圖片或資源,即使符合行動裝置來流覽,
在行動頻寬下,等待下載的時間長,檔案也過大。
解法:RWD + Server Side Solution,透過伺服器端判斷裝置後調配
資源
- 29. @media screen and (max-width: 980px) {
/* style */
}
@media screen and (max-width: 720px) {
/* style */
}
@media screen and (max-width: 480px) {
/* style */
}
Media Queries
- 30. Media Queries : Breakpoint
@media screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
Device寫法:當螢幕寬度超過900像素時,
class的背景是灰色的
- 33. 隱藏/顯示content
@media screen and (max-width: 980px) {
.col { with: 23.4%; }
}
@media screen and (max-width: 720px) {
.col { with: 23.4%; }
}
@media screen and (max-width: 480px) {
.col { display: none; }
}
- 39. 框架必熟的撇步
1. 搞懂Grid System
2. 從套用template開始著手
3. 熟悉常用的class name
4. 熟悉顏色規則
5. 既然有vertical,一定有horizontal
6. 既然有Left就會有right, center
7. 特效請愛用jQuery 相關Plugin