ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[TOC] # 携程网需求 | ![](https://img.kancloud.cn/2d/c8/2dc84aba2efb152a7a9a2d8842b29400_1284x852.png) | ![](https://img.kancloud.cn/09/bd/09bdd55e6d92ac64183a50f60d2ba6b2_1030x784.png) | | --- | --- | # 准备步骤 ## 1.技术选型 方案:我们采取单独制作移动页面方案 技术:布局采取flex布局 ## 2.搭建相关文件夹结构 ![](https://img.kancloud.cn/53/bb/53bb9578fcfa3c39795e1f9d7ba126d2_686x359.png) ## 3.设置视口标签以及引入初始化样式 ~~~ <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1 .0"> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/ index. css"> ~~~ 4.常用初始化样式 ~~~ body { max-width: 540px; min-width: 320px; margin: 0 auto; font: normal 14px/1.5 Tahoma, "Lucida Grande", Verdana, "Microsoft Yahei", STxihei,hei; color: #000; background: #f2f2f2; overflow-x: hidden; -webkit-tap-highl ight-color: transparent; } ~~~ # 开始 | ![](https://img.kancloud.cn/30/21/3021a46a414388099eb898fc24a577a0_976x167.png) | 固定定位必须给宽度![](https://img.kancloud.cn/9b/14/9b14fbb5d49180036a620c832f037049_891x581.png)2、样式![](https://img.kancloud.cn/67/ce/67ce9f57575cbe1db1e536cb34031c69_1139x855.png)3、搜索![](https://img.kancloud.cn/de/99/de99b08539fcec882341ecb7bd53c84a_698x516.png)4、放大镜![](https://img.kancloud.cn/b8/0e/b80e00044bb4f4804600d63d6dcef5b5_1199x403.png) | | --- | --- | | 2、![](https://img.kancloud.cn/d2/d8/d2d8142a8d3837a3654421f865df277a_934x423.png) | ![](https://img.kancloud.cn/f5/6c/f56c0b87648d0928800840fda40d4530_803x422.png) | | 3、![](https://img.kancloud.cn/f5/77/f5778430b04bbaee40cabc59b458a5f5_982x199.png)![](https://img.kancloud.cn/7d/fe/7dfe1deb8635f9442befd588081b36c7_910x268.png) | 1、清除默认![](https://img.kancloud.cn/b3/4b/b34bfe7c37bb4f23929132dea75a5477_422x213.png)2、给高不给宽![](https://img.kancloud.cn/ce/65/ce65a303d28f4a72b8020bd797babf88_719x474.png) | | ![](https://img.kancloud.cn/9a/f0/9af033b058d9807688eba201ffd63e05_1318x403.png) | ![](https://img.kancloud.cn/10/f7/10f745d7a4353b42e3cb608607071aee_788x528.png)![](https://img.kancloud.cn/84/13/8413e0d2fb674cebcfa383a63d02e217_1291x789.png) | | 4、nav导航栏![](https://img.kancloud.cn/01/a0/01a0cad0ae67a11cd6cf4c2c82ba2aa1_1209x462.png) | 上下平分![](https://img.kancloud.cn/6e/97/6e97693d376a91ac5ed9aa1cd4f0bbad_604x429.png)![](https://img.kancloud.cn/b2/62/b2620b19ab8508204006ddaf8af294e3_387x92.png)![](https://img.kancloud.cn/d3/96/d3969967ac7381d864fb7b48c4e72411_835x581.png)![](https://img.kancloud.cn/74/f4/74f43db6c74e735e5303d7b12bb8870e_1224x236.png) | | 5、![](https://img.kancloud.cn/90/8e/908eae3206dcf3d54bd5a37a049ad53f_978x306.png) | ![](https://img.kancloud.cn/71/19/71192c96d88814d9ae303bdffcec6ae3_983x587.png) | | 6、![](https://img.kancloud.cn/a8/0b/a80b3863c46509873f173f3e3bec4078_1069x617.png)6.1![](https://img.kancloud.cn/3e/9d/3e9d656734504bc150b43dc786e795c6_201x86.png) 6.2![](https://img.kancloud.cn/4c/84/4c843a52e439cc3fd4359f31d18dcdfa_208x82.png) | **让浏览器知道这是一个标题 但是不显示标题名字![](https://img.kancloud.cn/1b/85/1b85274abf0a079ec6b41faea938435a_775x381.png)![](https://img.kancloud.cn/f4/67/f467f9daaad2de1855ec1425e6e6012a_1123x452.png)6.2![](https://img.kancloud.cn/62/25/6225c53b7fc7d95bfed5ef82a0623b9c_1242x349.png)![](https://img.kancloud.cn/91/8e/918ee2c0482dc13a355b31ab17445192_907x502.png)** | | ![](https://img.kancloud.cn/2f/b9/2fb90fbd9902b63fd5dac3eaf83f5024_878x680.png) | ![](https://img.kancloud.cn/33/30/33305eaa58a3d4e007ed19eff85e4765_849x693.png) | /*背景渐变必须添加浏览器私有前缀*/ background: -webkit- linear- gradient(left, red, blue); ![](https://img.kancloud.cn/d0/93/d093918629d45d5a1034243d80dfc75d_996x356.png) # 背景线进渐变 ![](https://img.kancloud.cn/98/6e/986e43bef6ec1ac426537f32fcd752f2_1165x538.png) # flex布局 重点 ![](https://img.kancloud.cn/9a/f0/9af033b058d9807688eba201ffd63e05_1318x403.png)