携程在线网页制作(flex布局)

1.技术选型
方案:单独制作移动端页面
技术:flex布局
2.搭建相关文件夹结构
css images(背景图、精灵图等) upload(产品图) index.html
3.引入
引入视口标签和相关样式

文件夹搭建

html代码完整版

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no,maximun-scale=1.0,minimun-scale=1.0"><!-- 引入css初始化文件 --><link rel="stylesheet" href="css/normalize.css"><!-- 引入我们首页的css --><link rel="stylesheet" href="css/index.css"><title>携程在手,说走就走</title>
</head><body><!-- 顶部搜索 --><div class="search-index"><div class="search">搜索:目的地/酒店/景点/航班号</div><a href="#" class="user">我 的</a></div><!-- 焦点图模块 --><div class="focus"><img src="upload/focus.jpg" alt=""></div><!-- local-nav模块 --><ul class="local-nav"><li><a href="#" title="景点·玩乐"><span class="local-nav-icon-icon1"></span><span>景点·玩乐</span></a></li><li><a href="#" title="景点·玩乐"><span class="local-nav-icon-icon2"></span><span>景点·玩乐</span></a></li><li><a href="#" title="景点·玩乐"><span class="local-nav-icon-icon3"></span><span>景点·玩乐</span></a></li><li><a href="#" title="景点·玩乐"><span class="local-nav-icon-icon4"></span><span>景点·玩乐</span></a></li><li><a href="#" title="景点·玩乐"><span class="local-nav-icon-icon5"></span><span>景点·玩乐</span></a></li></ul><!-- 主导航栏 --><nav><div class="nav-common"><div class="nav-items"><a href="#">海外酒店</a></div><div class="nav-items"><a href="#">海外酒店</a><a href="#">特价酒店</a></div><div class="nav-items"><a href="#">海外酒店</a><a href="#">特价酒店</a></div></div><div class="nav-common"><div class="nav-items"><a href="#">海外酒店</a></div><div class="nav-items"><a href="#">海外酒店</a><a href="#">特价酒店</a></div><div class="nav-items"><a href="#">海外酒店</a><a href="#">特价酒店</a></div></div><div class="nav-common"><div class="nav-items"><a href="#">海外酒店</a></div><div class="nav-items"><a href="#">海外酒店</a><a href="#">特价酒店</a></div><div class="nav-items"><a href="#">海外酒店</a><a href="#">特价酒店</a></div></div></nav><!-- 侧导航栏 --><ul class="subnav-entry"><li><a href="#"><span class="subnav-entry-icon"></span><span>电话费</span></a></li><li><a href="#"><span class="subnav-entry-icon"></span><span>电话费</span></a></li><li><a href="#"><span class="subnav-entry-icon"></span><span>电话费</span></a></li><li><a href="#"><span class="subnav-entry-icon"></span><span>电话费</span></a></li><li><a href="#"><span class="subnav-entry-icon"></span><span>电话费</span></a></li><li><a href="#"><span class="subnav-entry-icon"></span><span>电话费</span></a></li><li><a href="#"><span class="subnav-entry-icon"></span><span>电话费</span></a></li><li><a href="#"><span class="subnav-entry-icon"></span><span>电话费</span></a></li><li><a href="#"><span class="subnav-entry-icon"></span><span>电话费</span></a></li><li><a href="#"><span class="subnav-entry-icon"></span><span>电话费</span></a></li></ul><!-- 销售模块 --><div class="sales-box"><div class="sales-hd"><h2>热门活动</h2><a href="#" class="more">获取更多福利</a></div><div class="sales-bd"><div class="row"><a href="#"><img src="upload/pic1.jpg" alt=""></a><a href="#"><img src="upload/pic2.jpg" alt=""></a></div><div class="row"><a href="#"><img src="upload/pic1.jpg" alt=""></a><a href="#"><img src="upload/pic2.jpg" alt=""></a></div><div class="row"><a href="#"><img src="upload/pic1.jpg" alt=""></a><a href="#"><img src="upload/pic2.jpg" alt=""></a></div></div></div></body></html>

css初始化代码


/*reset.css用来存储清除浏览器的样式 ,后面添加了一部分通用样式*/a {background-color: transparent;text-decoration: none;-webkit-tap-highlight-color: rgba(0, 0, 0, 0)
}a:hover {outline: none;text-decoration: none;
}a,
a:hover,
a:active,
a:visited,
a:link,
a:focus {-webkit-tap-highlight-color: rgba(0, 0, 0, 0);-webkit-tap-highlight-color: transparent;outline: none;text-decoration: none;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);-webkit-user-modify: read-only;cursor: pointer;
}body,
div,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
code,
form,
fieldset,
legend,
input,
button,
textarea,
p,
blockquote,
th,
td {margin: 0;padding: 0;
}table {border-collapse: collapse;border-spacing: 0;
}fieldset,
img {border: 0;
}address,
caption,
cite,
code,
dfn,
em,
strong,
th,
var,
optgroup {font-style: inherit;font-weight: inherit;
}del,
ins {text-decoration: none;
}li {list-style: none;
}caption,
th {text-align: left;
}h1,
h2,
h3,
h4,
h5,
h6 {font-size: 100%;font-weight: normal;
}q:before,
q:after {content: '';
}abbr,
acronym {border: 0;font-variant: normal;
}sup {vertical-align: baseline;
}sub {vertical-align: baseline;
}/*because legend doesn't inherit in IE */legend {color: #000;
}input,
button,
textarea,
select,
optgroup,
option {font-family: inherit;font-size: inherit;font-style: inherit;font-weight: inherit;
}button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {-webkit-appearance: button;cursor: pointer;
}/*@purpose To enable resizing for IE *//*@branch For IE6-Win, IE7-Win */input,
button,
textarea,
select {*font-size: 100%;outline: none;
}/*select*/select {/*复写Chrome和Firefox里面的边框*/border: 1px solid green;/*清除默认样式*/appearance: none;-moz-appearance: none;-webkit-appearance: none;/*在选择框的最右侧中间显示小箭头图片*//*background: url(../img/icon/icon_select.png) no-repeat scroll right center transparent;*//*为下拉小箭头留出一点位置,避免被文字覆盖*/padding-right: 14px;
}/*清除ie的默认选择框样式清除,隐藏下拉箭头*/select::-ms-expand {display: none;
}/* 个人在后面添加了一些常用的公共样式 *//*居中效果*/.margin_center {margin: 0px auto;
}/*浮动*/.float_left {float: left;
}.float_right {float: right;
}/*文字位置*/.text_center {text-align: center;
}.text_left {text-align: left;
}.text_right {text-align: right;
}/*position*/.position_relative {position: relative;
}.position_absolute {position: absolute;
}/*边框*/.no_border {border: 0px!important;border-right: 0px!important;
}/*宽度*/.width_whole {width: 100%;
}/*清除格式*/.clear_both {clear: both;
}.no_margin {margin: 0px!important;
}/* 展示样式 */.display_block {display: block;
}.display_none {display: none;
}.visibility_hidden {visibility: hidden;
}/*清除浮动*/.clearfix:after {content: "";display: block;height: 0;clear: both;visibility: hidden;
}* html .clearfix {zoom: 1;
}/* IE6 */*+html .clearfix {zoom: 1;
}/* IE7 */body {font-family: 'PingFangSC', 'helvetica neue', 'hiragino sans gb', 'arial', 'microsoft yahei ui', 'microsoft yahei', 'simsun', 'sans-serif'!important;font-size: 10px;
}`

css代码完整版

body {max-width: 540px;min-width: 320px;margin: 0 auto;font: normal 14px/1.5 Tahoma, "Lucida Grande", Verdana, "Micrsoft Yahei", STXihei, hei;color: #000;overflow-x: hidden;-webkit-tap-highlight-color: transparent;height: 2000px;
}ul {list-style: none;margin: 0;padding: 0;
}/* 搜索模块 */.search-index {display: flex;/* 固定定位以屏幕为准 */position: fixed;top: 0;left: 50%;/* 固定盒子应该有宽度 */-webkit-transform: translateX(-50%);transform: translateX(-50%);width: 100%;min-width: 320px;max-width: 540px;height: 44px;/* background-color: pink; */background-color: #f6f6f6;border-top: 1px solid #ccc;border-bottom: 1px solid #ccc;
}a {text-decoration: none;color: #222;
}div {box-sizing: border-box;
}.search {position: relative;height: 26px;list-style: 24px;border: 1px solid #ccc;flex: 1;font-size: 12px;color: #666;margin: 7px 10px;padding-left: 25px;border-radius: 5px;box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
}.search::before {content: "";position: absolute;top: 5px;left: 5px;width: 15px;height: 15px;background: url(.../images/sprite.png) no-repeat -59px -279px;background-size: 104px auto;/* margin: 5px; */
}.user {width: 44px;height: 44px;/* background-color: purple; */font-size: 12px;text-align: center;color: #2eaae0;
}.user::before {content: "";display: block;width: 23px;height: 23px;background: url(.../images/sprite.png) no-repeat -59px -194px;background-size: 104px auto;margin: 4px auto -2px;
}/* 焦点图模块 */.focus {padding-top: 44px;
}.focus img {width: 100%;
}/* 局部导航栏 */.local-nav {display: flex;height: 64px;background-color: #fff;margin: 3px 4px;border-radius: 8px;
}.local-nav li {flex: 1;
}.local-nav a {display: flex;flex-direction: column;align-items: center;font-size: 12px;
}.local-nav li[class^="local-nav-icon"] {/* 属性选择器 */width: 32px;height: 32px;background-color: pink;margin-top: 8px;background: url(.../images/localnav_bg.png) no-repeat 0 0;background-size: 32px auto;
}.local-nav li.local-nav-icon-icon2 {background-position: 0 -32px;
}.local-nav li.local-nav-icon-icon3 {background-position: 0 -64px;
}.local-nav li.local-nav-icon-icon4 {background-position: 0 -96px;
}.local-nav li.local-nav-icon-icon5 {background-position: 0 -128px;
}/* nav */nav {overflow: hidden;border-radius: 8px;margin: 0 4px 3px;
}.nav-common {display: flex;height: 88px;background-color: pink;
}.nav-common:nth-child(2) {margin: 3px 0;
}.nav-items {display: flex;flex: 1;flex-direction: column;
}.nav-items a {flex: 1;text-align: center;line-height: 44px;color: #fff;font-size: 14px;text-shadow: 1px 1px rgba(0, 0, 0, .2);
}.nav-items a:nth-child(1) {border-bottom: 1px solid #fff;
}.nav-items:nth-child(1) a {border: 0;background: url(../images/hotel.png) no-repeat bottom center;background-size: 121px auto;
}/* -n+2  就是前两个 */.nav-items:nth-child(-n+2) {border-right: 1px solid #fff;
}.subnav-entry {display: flex;border-radius: 8px;background-color: #fff;margin: 0 4px;flex-wrap: wrap;padding: 5px 0;
}.subnav-entry li {flex: 20%;
}.subnav-entry a {display: flex;flex-direction: column;align-items: center;
}.subnav-entry-icon {width: 28px;height: 28px;background-color: pink;margin-top: 4px;background: url(../images/.subnav-bg.png) no-repeat;background-size: 28px auto;
}.sales-box {border-top: 1px solid #ccc;background-color: #fff;margin: 4px;
}.sales-hd {position: relative;height: 44px;border-bottom: 1px solid #ccc;
}.sales-hd h2 {position: relative;text-indent: -999px;overflow: hidden;
}.sales-hd h2 ::after {position: absolute;top: 5px;left: 8px;content: "";width: 79px;height: 15px;background-color: pink;background: url(../images/hot.png) no-repeat 0 -20px;background-size: 79px auto;
}.more {position: absolute;right: 5px;top: 0px;background: -webkit-linear-gradient(left, #ff506c, #ff6bc6);border-radius: 15px;padding: 3px 20px 3px 10px;color: #fff;
}.more::after {content: "";position: absolute;top: 7px;right: 9px;width: 7px;height: 7px;border-top: 2px solid #fff;border-right: 2px solid #fff;transform: rotate(45deg);
}.row {display: flex;
}.row a {flex: 1;border-bottom: 1px solid #ccc;
}.row a:nth-child(1) {border-right: 1px solid #eee;
}.row a img {width: 100%;
}

携程在线网页制作(flex布局)相关推荐

  1. 携程在线网页制作(flex布局)(静态页面)

    1.技术选型 方案:单独制作移动端页面 技术:flex布局2.搭建相关文件夹结构 css images(背景图.精灵图等) upload(产品图)   index.html 3.引入 引入视口标签和相 ...

  2. 携程在线风控系统架构

    https://mp.weixin.qq.com/s/muufqznNNVidPgamlcurCQ 为了应对日益严重的支付欺诈,携程在线风控系统2011年正式上线.现在,在线风控系统支撑了携程每日1亿 ...

  3. 微信诱导关注php源码,微信公众平台关于在线网页制作类诱导关注的公告

    近期,微信公众平台发现部分公众号通过向用户提供制作音乐相册.照片相册等在线网页制作工具的形式,实施诱导关注的行为.具体形式包括但不限于诱导用户关注公众号制作在线网页,篡改用户制作的相册内容.添加诱导关 ...

  4. 网页HTML5制作flex布局骰子,css利用flex布局画骰子的六个面

    主要是利用flex的一些特性来写的,掌握好flex基础,写出筛子的几个页面不是问题. 推荐去我写的一个博客中有flex的小练习 线上练习flex布局 html css .shaizi { width: ...

  5. 网页HTML5制作flex布局骰子,css3 flex布局结合transform生成一个3D骰子

    1 Flex 布局 首先聊聊Flex 布局,Flex 布局又称"弹性布局",任何容器都可以指定为Flex布局,设置Flex布局会使得子元素的float.clear.vertical ...

  6. 网页HTML5制作flex布局骰子,flex布局实现骰子

    学习flex布局后的实例布局--骰子 具体实现原理可参考阮一峰的Flex 布局教程:实例篇和博客flex布局实现色子 效果图: 骰子.png 代码如下: flex布局实例--骰子 *{ margin: ...

  7. Bootstrap4+MySQL前后端综合实训-Day01-AM【实训安排、HBuilder下载及使用、双飞翼布局(圣杯布局)案例、CSS在线手册、flex布局中的对齐方式】

    [Bootstrap4前端框架+MySQL数据库]前后端综合实训[10天课程 博客汇总表 详细笔记] 目   录 实训安排 日常要求.项目要求 项目开发流程 HTML+CSS+JavaScript 基 ...

  8. 去哪儿对垒携程 在线旅游静悄悄的革命

    出处:21世纪经济报道 时间:2011-05-11 10:38[ 字体: 大 中 小 ] [打印此页] [关闭] 颠覆与被颠覆的游戏,正于在线旅游市场悄然演绎.  5月10日,携程收报48.3美元,市 ...

  9. 144G在线网页制作html系统源码下载

    144G网页制作系统完美源码主要是用来一键生成表白页面.个人网站.搞笑网页在线制作生成源码,让制作网页变更更简单,真个页面的前端设计非常美观,动画效果很棒,可以设置网站来使用指定的网页制作模板,从而增 ...

最新文章

  1. 对比几个数据概念,数据仓库、数据集市、数据湖、数据中台分别是什么?到底有什么区别?都得做吗?
  2. 计算机网络(谢希仁第八版)第二章:物理层
  3. 看完这个你还不理解右值引用和移动构造 你就可以来咬我(下)
  4. 爬虫-请求图片并打开显示图片
  5. 期中HTML代码及技术博客
  6. 修复Mac无法进入睡眠模式的技巧
  7. [转]访问 OData 服务 (WCF Data Services)
  8. jdbc连接mysql数据库 工作流程_jdbc连接数据库流程图
  9. 简单了解一下如何使用Spring框架里JDBC和事务
  10. 【解决方案】PDF文字复制后乱码
  11. mathtype过期,不用每次都去回顾教程
  12. 科学计算机怎么用10次方,计算器里10次方怎么按
  13. wbincms v1.5 综合门户管理系统发布 thinkphp3.2.3+amazui-2.5.2
  14. 看了几十篇轻量化目标检测论文扫盲做的摘抄笔记
  15. pycharm和webstorm下载安装流程
  16. D - Petya and Array(树状数组,二分)
  17. 【CXY】JAVA应用 之 快捷工具托盘
  18. 非常有用的生活小常识
  19. java加密常用的方法_JAVA MD5 加密常用 方法
  20. 基于CAD纵断面图生成地质体模型

热门文章

  1. 历史上最知名的15位计算机科学家
  2. 【会计毕业论文】ERP系统在电商零售企业会计核算中的应用(节选)
  3. OpenGL与3D图形世界
  4. 第一章 概述与第一个程序
  5. 旋转——绕原点二维旋转,绕任意点的二维旋转,三维基本旋转,绕任意轴的三维旋转
  6. 中国象棋软件-引擎实现(四)搜索算法
  7. 大数据分析与数据分析的根本区别在哪里?
  8. 001:Pell数列
  9. u盘病毒制作教程和源码
  10. 爬虫神器 Pyppeteer 介绍及爬取某商城实战