
```
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="static/css/font-icon.css" />
<title>移動端布局參考方案(以商城為例)</title>
<style>
/* 初始化 */
* {
margin: 0;
padding: 0;
}
a {
text-decoration: none;
color: #666;
}
html {
/* vw: 可視區寬度,100vw:表示占滿100份 */
width: 100vw;
height: 100vh;
/* 在html中設置字體大小, 給后的rem單位用 */
font-size: 14px;
}
body {
min-width: 360px;
background-color: #fff;
display: flex;
flex-flow: column nowrap;
}
body > header {
background-color: #333;
color: white;
height: 30px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 15px;
position: fixed;
width: 95vw;
}
body > .slider {
height: 180px;
}
body > .slider > img {
width: 100%;
}
/* 主導航區 */
nav {
height: 200px;
display: flex;
/* 變成多行容器 */
flex-flow: row wrap;
}
nav > div {
/* 占寬度四分之一 */
width: 25vw;
display: flex;
flex-flow: column nowrap;
align-items: center;
}
nav > div > a:first-of-type {
text-align: center;
}
nav > div img {
width: 50%;
}
.hot {
color: coral;
}
.title {
font-size: 1.2rem;
font-weight: normal;
text-align: center;
margin-top: 10px;
}
/* 熱銷區樣式 */
.hot-goods {
border: 1px solid #cfcfcf;
margin-top: 10px;
font-size: 0.8rem;
display: flex;
flex-flow: row wrap;
}
.hot-goods img {
width: 100%;
}
.hot-goods > .goods-img {
padding: 10px;
box-sizing: border-box;
flex: 1 0 30vw;
display: flex;
flex-flow: column nowrap;
justify-content: center;
}
.hot-goods > .goods-img > div {
display: flex;
justify-content: space-around;
}
/* 商品列表 */
.list-goods {
padding: 10px;
box-sizing: border-box;
border: 1px solid #cfcfcf;
font-size: 0.8rem;
margin-top: 10px;
display: flex;
flex-flow: column nowrap;
}
.list-goods > .goods-desc {
display: flex;
margin: 10px 0;
}
.list-goods img {
width: 100%;
}
.list-goods > .goods-desc > a {
padding: 10px;
box-sizing: border-box;
}
.list-goods > .goods-desc > a:hover {
color: lightseagreen;
}
/* 頁腳 */
body > footer {
color: #666;
background-color: #efefef;
border-top: 1px solid #ccc;
height: 55px;
position: fixed;
bottom: 0;
width: 100vw;
display: flex;
justify-content: space-around;
}
body > footer > a {
margin-top: 10px;
font-size: 0.8rem;
display: flex;
flex-flow: column nowrap;
align-items: center;
}
body > footer > a > span:first-of-type {
font-size: 1.6rem;
}
</style>
</head>
<body>
<!-- 頁眉 -->
<header>
<a href="">LOGO</a>
<span class="iconfont"></span>
</header>
<!-- 輪播圖 -->
<div class="slider">
<img src="static/images/banner.jpg" alt="" />
</div>
<!-- 主導航區 -->
<nav>
<div>
<a href=""><img src="static/images/link1.webp" alt="" /></a>
<a href="">超市精選</a>
</div>
<div>
<a href=""><img src="static/images/link2.webp" alt="" /></a>
<a href="">服裝百貨</a>
</div>
<div>
<a href=""><img src="static/images/link3.webp" alt="" /></a>
<a href="">優惠劵</a>
</div>
<div>
<a href=""><img src="static/images/link4.webp" alt="" /></a>
<a href="">超市精選</a>
</div>
<div>
<a href=""><img src="static/images/link1.webp" alt="" /></a>
<a href="">超市精選</a>
</div>
<div>
<a href=""><img src="static/images/link2.webp" alt="" /></a>
<a href="">服裝百貨</a>
</div>
<div>
<a href=""><img src="static/images/link3.webp" alt="" /></a>
<a href="">優惠劵</a>
</div>
<div>
<a href=""><img src="static/images/link4.webp" alt="" /></a>
<a href="">超市精選</a>
</div>
</nav>
<!-- 熱銷商品 -->
<h2 class="title">熱銷商品<span class="iconfont hot"></span></h2>
<!-- 熱銷商品 -->
<div class="hot-goods">
<div class="goods-img">
<a href=""><img src="static/images/goods1.jpg" alt="" /></a>
<p>Apple iPhone X 128G</p>
<div>
<span>4299 元</span>
<span class="iconfont hot"></span>
</div>
</div>
<div class="goods-img">
<a href=""><img src="static/images/goods1.jpg" alt="" /></a>
<p>Apple iPhone X 256G</p>
<div>
<span>6299 元</span>
<span class="iconfont hot"></span>
</div>
</div>
<div class="goods-img">
<a href=""><img src="static/images/goods1.jpg" alt="" /></a>
<p>Apple iPhone X 512G</p>
<div>
<span>8299 元</span>
<span class="iconfont hot"></span>
</div>
</div>
<div class="goods-img">
<a href=""><img src="static/images/goods2.jpg" alt="" /></a>
<p>Apple iPhone X 128G</p>
<div>
<span>4299 元</span>
<span class="iconfont hot"></span>
</div>
</div>
<div class="goods-img">
<a href=""><img src="static/images/goods2.jpg" alt="" /></a>
<p>Apple iPhone X 256G</p>
<div>
<span>6299 元</span>
<span class="iconfont hot"></span>
</div>
</div>
<div class="goods-img">
<a href=""><img src="static/images/goods2.jpg" alt="" /></a>
<p>Apple iPhone X 512G</p>
<div>
<span>8299 元</span>
<span class="iconfont hot"></span>
</div>
</div>
</div>
<!-- 商品列表 -->
<h2 class="title">商品列表<span class="iconfont hot"></span></h2>
<div class="list-goods">
<div class="goods-desc">
<a href=""><img src="static/images/goods4.jpg" alt="" /></a>
<a href=""
>[白條24期免息]Apple蘋果iPhone 11 手機 128G 全網通, 免費領取500元話費,
今天17:00下單,明晨12:00之前送達,7天無理由退貨,官方提供售后,
以上都是我瞎編的<span
class="iconfont hot"
style="vertical-align: middle;"
></span
></a
>
</div>
<div class="goods-desc">
<a href=""><img src="static/images/goods3.jpg" alt="" /></a>
<a href=""
>[白條24期免息]Apple洗衣機,專業清洗蘋果手機,
蘋果電腦,iPad,洗好保證不能用, 免費領取500元保險費,
今天17:00下單,明晨12:00之前送達,7天無理由退貨,官方提供售后,
以上都是我瞎編的<span
class="iconfont hot"
style="vertical-align: middle;"
></span
></a
>
</div>
<div class="goods-desc">
<a href=""><img src="static/images/goods5.png" alt="" /></a>
<a href=""
>[白條24期免息]Apple蘋果iPhone 11 手機 128G 全網通, 免費領取500元話費,
今天17:00下單,明晨12:00之前送達,7天無理由退貨,官方提供售后,
以上都是我瞎編的<span
class="iconfont hot"
style="vertical-align: middle;"
></span
></a
>
</div>
<div class="goods-desc">
<a href=""><img src="static/images/goods2.jpg" alt="" /></a>
<a href=""
>[白條24期免息]華為筆記本MateBook 14 全面屏輕薄性能筆記本電腦
十代酷睿(i5 16G 512G MX250 觸控屏 多屏協同)灰, 以上都是我瞎編的<span
class="iconfont hot"
style="vertical-align: middle;"
></span
></a
>
</div>
</div>
<!-- 頁腳 -->
<footer>
<a href="">
<span class="iconfont hot"></span>
<span>首頁</span>
</a>
<a href="">
<span class="iconfont hot"></span>
<span>分類</span>
</a>
<a href="">
<span class="iconfont hot"></span>
<span>購物車</span>
</a>
<a href="">
<span class="iconfont hot"></span>
<span>未登錄</span>
</a>
</footer>
</body>
</html>
```
- 文檔說明
- 開始
- linux
- 常用命令
- ps -ef
- lsof
- netstat
- 解壓縮
- 復制
- 權限
- 其他
- lnmp集成安裝
- supervisor
- 安裝
- supervisor進程管理
- nginx
- 域名映射
- 負載均衡配置
- lnmp集成環境安裝
- nginx源碼安裝
- location匹配
- 限流配置
- 日志配置
- 重定向配置
- 壓縮策略
- nginx 正/反向代理
- HTTPS配置
- mysql
- navicat創建索引
- 設置外網鏈接mysql
- navicat破解
- sql語句學習
- 新建mysql用戶并賦予權限
- php
- opcache
- 設計模式
- 在CentOS下安裝crontab服務
- composer
- 基礎
- 常用的包
- guzzle
- 二維碼
- 公共方法
- 敏感詞過濾
- IP訪問頻次限制
- CURL
- 支付
- 常用遞歸
- 數據排序
- 圖片相關操作
- 權重分配
- 毫秒時間戳
- base64<=>圖片
- 身份證號分析
- 手機號相關操作
- 項目搭建 公共處理函數
- JWT
- 系統函數
- json_encode / json_decode 相關
- 數字計算
- 數組排序
- php8
- jit特性
- php8源碼編譯安裝
- laravel框架
- 常用artisan命令
- 常用查詢
- 模型關聯
- 創建公共方法
- 圖片上傳
- 中間件
- 路由配置
- jwt
- 隊列
- 定時任務
- 日志模塊
- laravel+swoole基本使用
- 拓展庫
- 請求接口log
- laravel_octane
- 微信開發
- token配置驗證
- easywechart 獲取用戶信息
- 三方包
- webman
- win下熱更新代碼
- 使用laravel db listen 監聽sql語句
- guzzle
- 使用workman的httpCLient
- 修改隊列后代碼不生效
- workman
- 安裝與使用
- websocket
- eleticsearch
- php-es 安裝配置
- hyperf
- 熱更新
- 安裝報錯
- swoole
- 安裝
- win安裝swoole-cli
- google登錄
- golang
- 文檔地址
- 標準庫
- time
- 數據類型
- 基本數據類型
- 復合數據類型
- 協程&管道
- 協程基本使用
- 讀寫鎖 RWMutex
- 互斥鎖Mutex
- 管道的基本使用
- 管道select多路復用
- 協程加管道
- beego
- gin
- 安裝
- 熱更新
- 路由
- 中間件
- 控制器
- 模型
- 配置文件/conf
- gorm
- 初始化
- 控制器 模型查詢封裝
- 添加
- 修改
- 刪除
- 聯表查詢
- 環境搭建
- Windows
- linux
- 全局異常捕捉
- javascript
- 常用函數
- vue
- vue-cli
- 生產環境 開發環境配置
- 組件通信
- 組件之間通信
- 父傳子
- 子傳父
- provide->inject (非父子)
- 引用元素和組件
- vue-原始寫法
- template基本用法
- vue3+ts項目搭建
- vue3引入element-plus
- axios 封裝網絡請求
- computed 計算屬性
- watch 監聽
- 使用@符 代替文件引入路徑
- vue開發中常用的插件
- vue 富文本編輯
- nuxt
- 學習筆記
- 新建項目踩坑整理
- css
- flex布局
- flex PC端基本布局
- flex 移動端基本布局
- 常用css屬性
- 盒子模型與定位
- 小說分屏顯示
- git
- 基本命令
- fetch
- 常用命令
- 每次都需要驗證
- git pull 有沖突時
- .gitignore 修改后不生效
- 原理解析
- tcp與udp詳解
- TCP三次握手四次揮手
- 緩存雪崩 穿透 更新詳解
- 內存泄漏-內存溢出
- php_fpm fast_cgi cig
- redis
- 相關三方文章
- API對外接口文檔示范
- elaticsearch
- 全文檢索
- 簡介
- 安裝
- kibana
- 核心概念 索引 映射 文檔
- 高級查詢 Query DSL
- 索引原理
- 分詞器
- 過濾查詢
- 聚合查詢
- 整合應用
- 集群
- docker
- docker 簡介
- docker 安裝
- docker 常用命令
- image 鏡像命令
- Contrainer 容器命令
- docker-compose
- redis 相關
- 客戶端安裝
- Linux 環境下安裝
- uni
- http請求封裝
- ios打包
- 視頻縱向播放
- 日記
- 工作日記
- 情感日志
- 壓測
- ab
- ui
- thorui
- 開發規范
- 前端
- 后端
- 狀態碼
- 開發小組未來規劃