- CSS 教程
- CSS - 首頁
- CSS - 路線圖
- CSS - 簡介
- CSS - 語法
- CSS - 選擇器
- CSS - 包含
- CSS - 測量單位
- CSS - 顏色
- CSS - 背景
- CSS - 字型
- CSS - 文字
- CSS - 圖片
- CSS - 連結
- CSS - 表格
- CSS - 邊框
- CSS - 塊級邊框
- CSS - 行內邊框
- CSS - 外邊距
- CSS - 列表
- CSS - 內邊距
- CSS - 游標
- CSS - 輪廓
- CSS - 尺寸
- CSS - 捲軸
- CSS - 行內塊
- CSS - 下拉選單
- CSS - 可見性
- CSS - 溢位
- CSS - Clearfix
- CSS - 浮動
- CSS - 箭頭
- CSS - 調整大小
- CSS - 引號
- CSS - 順序
- CSS - 位置
- CSS - 連字元
- CSS - 懸停
- CSS - 顯示
- CSS - 聚焦
- CSS - 縮放
- CSS - 位移
- CSS - 高度
- CSS - 連字元字元
- CSS - 寬度
- CSS - 不透明度
- CSS - Z-index
- CSS - 底部
- CSS - 導航欄
- CSS - 覆蓋層
- CSS - 表單
- CSS - 對齊
- CSS - 圖示
- CSS - 圖片庫
- CSS - 註釋
- CSS - 載入器
- CSS - 屬性選擇器
- CSS - 組合器
- CSS - 根元素
- CSS - 盒模型
- CSS - 計數器
- CSS - 剪下
- CSS - 書寫模式
- CSS - Unicode-bidi
- CSS - min-content
- CSS - all
- CSS - inset
- CSS - isolation
- CSS - overscroll
- CSS - justify-items
- CSS - justify-self
- CSS - tab-size
- CSS - pointer-events
- CSS - place-content
- CSS - place-items
- CSS - place-self
- CSS - max-block-size
- CSS - min-block-size
- CSS - mix-blend-mode
- CSS - max-inline-size
- CSS - min-inline-size
- CSS - offset
- CSS - accent-color
- CSS - user-select
- CSS 高階
- CSS - 網格
- CSS - 網格佈局
- CSS - Flexbox
- CSS - 可見性
- CSS - 定位
- CSS - 層
- CSS - 偽類
- CSS - 偽元素
- CSS - @規則
- CSS - 文字效果
- CSS - 分頁媒體
- CSS - 列印
- CSS - 佈局
- CSS - 驗證
- CSS - 圖片精靈
- CSS - !important
- CSS - 資料型別
- CSS3 教程
- CSS3 - 教程
- CSS - 圓角
- CSS - 邊框圖片
- CSS - 多背景
- CSS - 顏色
- CSS - 漸變
- CSS - 盒陰影
- CSS - box-decoration-break
- CSS - caret-color
- CSS - 文字陰影
- CSS - 文字
- CSS - 2D 變換
- CSS - 3D 變換
- CSS - 過渡
- CSS - 動畫
- CSS - 多列
- CSS - box-sizing
- CSS - 工具提示
- CSS - 按鈕
- CSS - 分頁
- CSS - 變數
- CSS - 媒體查詢
- CSS - 函式
- CSS - 數學函式
- CSS - 遮罩
- CSS - 形狀
- CSS - 圖片樣式
- CSS - 特異性
- CSS - 自定義屬性
- CSS 響應式
- CSS RWD - 簡介
- CSS RWD - 視口
- CSS RWD - 網格檢視
- CSS RWD - 媒體查詢
- CSS RWD - 圖片
- CSS RWD - 影片
- CSS RWD - 框架
- CSS 工具
- CSS - PX 到 EM 轉換器
- CSS - 顏色選擇器和動畫
- CSS 資源
- CSS - 有用資源
- CSS - 討論
CSS 響應式框架
CSS 有幾個專門用於響應式網頁設計的框架。這些框架帶有內建的類和包,用於常用的UI元件,例如導航欄、選單欄、按鈕、圖片庫等。在本節中,我們將探討一些最流行且免費提供的用於響應式網頁設計的 CSS 框架。
響應式網頁設計框架
以下是常用的一些流行的響應式網頁設計框架
Bootstrap 框架
Bootstrap是一個廣泛使用的開源前端框架,用於建立響應式、移動優先的網站和 Web 應用程式。Bootstrap 提供了一系列 CSS 和 JavaScript 元件,例如網格、表單、按鈕和導航欄,這些元件易於實現和自定義。以下是 Bootstrap 框架的常見功能。
響應式設計功能
- 響應式網格系統:Bootstrap 提供了一個 12 列網格佈局,可適應各種螢幕尺寸。
- 實用程式類:Bootstrap 帶有實用程式類,有助於應用外邊距、內邊距和對齊調整以實現響應式。
- 內建元件:它包括響應式導航、輪播和模態框,這些元件會自動適應螢幕尺寸。
示例
<!DOCTYPE html>
<html lang="en">
<head>
<link href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css"
rel="stylesheet">
<script src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js">
</script>
</head>
<body>
<div class="container-fluid p-5 bg-secondary text-white text-center">
<h1>Bootstrap Framework</h1>
<p>Resize the screen to see the effect</p>
</div>
<div class="container mt-4">
<div class="row">
<div class="col-sm-4">
<h2>Column 1</h2>
<p>
Tutorialspoint - Simple and Easy Learning
<p>
Tutorialspoint - Simple and Easy Learning
</p>
</div>
<div class="col-sm-4">
<h3>Column 2</h3>
<p>Tutorialspoint - Simple and Easy Learning</p>
<p>Tutorialspoint - Simple and Easy Learning</p>
</div>
<div class="col-sm-4">
<h3>Column 3</h3>
<p>Tutorialspoint - Simple and Easy Learning</p>
<p>Tutorialspoint - Simple and Easy Learning</p>
</div>
</div>
</div>
</body>
</html>
Tailwind CSS
Tailwind CSS是一個實用優先的 CSS 框架,具有許多預定義的類。它具有多種自定義選項,可用於設計響應式網頁。使用 Tailwind,開發人員可以直接在 HTML 中設定元素樣式。Tailwind 還支援清除未使用的 CSS,透過刪除不必要的樣式來最佳化載入時間。
響應式設計功能
- 用於響應式的實用程式類:Tailwind 的實用程式類允許精確控制設計元素,從而可以輕鬆根據螢幕尺寸調整佈局、間距和對齊方式。
- 移動優先設計:Tailwind 採用移動優先方法進行設計,允許開發人員為較小的螢幕應用樣式,然後為較大的螢幕構建。
- 自定義斷點:Tailwind 支援新增自定義斷點,提供靈活性以定義針對特定專案需求量身定製的響應式行為。
示例
<!DOCTYPE html>
<html lang="en">
<head>
<link href=
"https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css"
rel="stylesheet">
</head>
<body class="bg-gray-100">
<div class="text-center py-10 bg-purple-600 text-white">
<h1 class="text-3xl font-bold">Tailwind CSS Framework</h1>
<p class="text-lg">
Resize the screen to see responsive behavior
</p>
</div>
<div class="container mx-auto mt-8">
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-xl font-semibold">Column 1</h2>
<p>
Tutorialspoint - Simple and Easy Learning
</p>
</div>
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-xl font-semibold">Column 2</h2>
<p>
Tutorialspoint - Simple and Easy Learning
</p>
</div>
<div class="bg-white p-6 rounded-lg shadow-md">
<h2 class="text-xl font-semibold">Column 3</h2>
<p>
Tutorialspoint - Simple and Easy Learning
</p>
</div>
</div>
</div>
</body>
</html>
Skeleton 框架
Skeleton是一個輕量級的 CSS 框架,它為響應式網頁設計提供了基本結構。它專注於簡潔性和速度,非常適合小型專案和快速原型設計。
響應式設計功能
- 12 列網格系統:Skeleton 的網格基於 12 列結構,可以準確調整以適應不同的螢幕尺寸。
- 簡單、輕量級的程式碼:Skeleton 的檔案大小很小,使其載入速度快且易於自定義。
- 預定義的響應式元素:Skeleton 包括響應式排版、表單、按鈕和其他基本元素。
示例
<!DOCTYPE html>
<html lang="en">
<head>
<link href=
"https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css"
rel="stylesheet">
</head>
<body>
<div class="container">
<h1>Skeleton Framework</h1>
<p>Resize the screen to see responsive layout adjustments</p>
<div class="row">
<div class="one-third column">
<h3>Column 1</h3>
<p>Tutorialspoint - Simple and Easy Learning</p>
</div>
<div class="one-third column">
<h3>Column 2</h3>
<p>Simple and Easy Learning</p>
</div>
<div class="one-third column">
<h3>Column 3</h3>
<p>Tutorialspoint - Simple and Easy Learning</p>
</div>
</div>
</div>
</body>
</html>
Semantic UI
Semantic UI是一個 CSS 框架,它使用使用者友好的 HTML 來建立響應式且視覺上吸引人的佈局。它包含許多主題和元件庫。以下是 Semantic UI 的功能。
響應式設計功能
- 響應式網格:Semantic UI 包含一個靈活的網格,可以適應各種螢幕尺寸。
- 可自定義的元件:提供一系列響應式 UI 元件,例如按鈕、表單和選單。
- 易於閱讀的標記:使用使用者友好的 HTML 和直觀的類,從而可以輕鬆建立響應式佈局。
示例
<!DOCTYPE html>
<html lang="en">
<head>
<link href=
"https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css"
rel="stylesheet">
</head>
<body>
<div class="ui container">
<h1 class="ui header">Semantic UI Framework</h1>
<p>Responsive design with Semantic UI</p>
<div class="ui three column grid">
<div class="column">
<h3>Column 1</h3>
<p>Tutorialspoint - Simple and Easy Learning</p>
</div>
<div class="column">
<h3>Column 2</h3>
<p>Simple and Easy Learning</p>
</div>
<div class="column">
<h3>Column 3</h3>
<p>Tutorialspoint - Simple and Easy Learning</p>
</div>
</div>
</div>
</body>
</html>
廣告