任务没完成,继续来!因为刚才网不好,我辛辛苦苦打了洋洋洒洒一大堆都没了!

我们今天主要是说一个简单的由Bootstrap和HTML5结合而成的小案例:

首先:由标题可得知,这是移动端,所以需要这样一串代码:

<meta name="viewport" content="width=device-width,initial-scale=1"/>

然后说Bootstrap拟态框,就还要有这样的插件:

<link type ="text/css" href="../dist/css/bootstrap.min.css" rel="stylesheet">

  <script src="../dist/js/bootstrap.js"></script>

然后,有点基础的都知道bootstrap,一定要和jquery一起使用,所以还要有jquery类库;
而且一定要放在bootstrap上边哦!各位亲们!

<script src="../jquery-3.1.1.min.js"></script>

先来看一眼效果:有点丑!不要建议,因为是PC端敲得!我使用浏览器WEB响应格式看的效果,见谅,见谅!

下面再来看一眼,拟态框的效果:

效果就是这样!

插件都准备好了,咱们来敲代码吧!

先是CSS的:在这里小提示一下,我用的是谷歌浏览器,CSS3的样式有些低版本的浏览器是不兼容的,所以就比较麻烦!更过几天我在更有一篇关于兼容问题的!

 <style>
body{
margin: 0 auto;
padding:;
}
nav{
width: 100%;
height: 35px;
}
article{
width: 100%;
background-color: #1983D1;
}
.div2{
width: 100%;
height: 30px;
line-height: 30px;
background-color: #1983D1;
}
.div2>input{
width: 78%;
height: 25px;
border:;
background-color: #2F8DD5;
/*border: 1px solid #2F8DD5;*/
border-radius: 5px;
margin-left: 1vw;;
}
/*改变输入框 提示字体颜色*/
input::placeholder{
color: #8DC0E4;
}
.div2>button{
width: 9%;
height: 25px;
background-color: #1983D1;
border:;
font-size: 3vw;
color: white;
}
.section1>ul{
list-style: none;
display: flex;
justify-content:space-around;
align-items:center;
width: 100%;
height: 10vw;
margin-left: -30px;
}
.section1>ul>li{
width: 24%;
color: white;
font-size: 2.5vw;
text-align: center;
margin-top: 2px;
}
.section2{
background-color: white;
width: 100%;
} .section2>ul{ list-style: none;
display: flex;
justify-content:space-around;
align-items:center;
width: 100%;
height: 6rem;
margin-left: -30px;
}
.section2>ul>li{
width: 24%;
/*color: white;*/
font-size: 2vw;
text-align: center;
margin-top: 2px;
}
.section2>ul>li>span{
font-size: 2.5rem;
}
.section3{
width: 100%;
height: 90px;
line-height: 90px;
}
.section3 img{
width: 20%;
height: 90px;
margin-top: -10px;
margin-left: 2vw;
border-radius: 15px;
}
.section4{
margin-top: -4vw;
width: 100%;
height: 49vw;
}
.section4>img{
width: 100%;
height: 49vw;
}
footer>ul{
width: 100%;
height: 50px;
/*line-height: 98px;*/
list-style: none;
display: flex;
justify-content: space-between;
margin-left: -1.5vw;
}
footer>ul>li{
width: 24%;
height: 48px;
font-size: 3vw;
text-align: center;
color: #A9A9A9;
margin-top: 3vw;
}
</style>

CSS好了.

咱们下面在敲一下HTML:

<body>
<nav>
<img src="1.png" style="width: 100%;height: 35px;" />
</nav>
<div class="div1"></div>
<div class="div2">
<input type="search" placeholder=" 蚂蚁花呗" />
<button><span class="icon icon-user-tie"></span></button>
<button data-toggle="modal" data-target="#kuang" data-backdrop="true"><span class="icon icon-plus"></span></button>
</div>
<!--模态框-->
<div class="modal fade modal-sm" id="kuang" style="width: 30%; margin-left: 65%;">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<!--体-->
<div class="modal-body">
<ul style="list-style: none; color:#6B6B6B;font-size: 2vw;">
<li><span class="icon icon-bubbles4" style="margin-left: -3vw;"></span>  发起群聊</li>
<li><span class="icon icon-user-plus" style="margin-left: -3vw;"></span>  添加朋友</li>
<li><span class="icon icon-qrcode" style="margin-left: -3vw;"></span>  扫 一 扫</li>
<li><span class="icon icon-coin-euro" style="margin-left: -3vw;"></span>  我要收款</li>
</ul>
</div>
</div>
</div>
</div>
<article>
<section class="section1">
<ul>
<li>
<span class="glyphicon glyphicon-qrcode"></span>
<div>扫一扫</div>
</li>
<li>
<span class="glyphicon glyphicon-usd"></span>
<div>付款</div>
</li>
<li>
<span class="glyphicon glyphicon-gbp"></span>
<div>收钱</div>
</li>
<li>
<span class="n glyphicon glyphicon-credit-card"></span>
<div>卡包</div>
</li>
</ul>
</section> <section class="section2">
<ul>
<li>
<span class="icon icon-coin-yen" style="color: #EE4A02;"></span>
<div>转账</div>
</li>
<li>
<span class="icon icon-credit-card" style="color: #EE4A02;"></span>
<div>信用卡还贷</div>
</li>
<li>
<span class="icon icon-mobile" style="color: red;"></span>
<div>充值中心</div>
</li>
<li>
<span class="icon icon-gift" style="color: red;"></span>
<div>红包</div>
</li>
</ul>
<ul>
<li>
<span class="icon icon-location" style="color: red;"></span>
<div>地图</div>
</li>
<li>
<span class="icon icon-database" style="color: orange;"></span>
<div>理财产品</div>
</li>
<li>
<span class="icon icon-connection" style="background-color: #1983D1;color: white;"></span>
<div>免费无线</div>
</li>
<li>
<span class="icon icon-warning" style="color: orange;"></span>
<div>安全须知</div>
</li>
</ul>
</section>
</article>
<hr style="background-color: #C3C3C3;width: 100%; height: 10px;" /> <section class="section3">
<img src="2.png" class="img-responsive" />
<span class="icon icon-camera pull-right" style="margin-top: -11.5vw;font-size: 5vw;margin-right: 2vw;color:#C3C3C3;"></span>
</section>
<hr style="background-color: #C3C3C3;width: 100%; height: 10px;" />
<section class="section4">
<img src="3.png" class="img-responsive" />
</section>
<footer>
<ul>
<li style="color: #1983D1;">
<span class="icon icon-svg"></span>
<div>支付宝</div>
</li>
<li>
<span class="icon icon-users"></span>
<div>朋友</div>
</li>
<li>
<span class="icon icon-hipster"></span>
<div>口碑</div>
</li>
<li>
<span class="icon icon-coin-dollar"></span>
<div>我的</div>
</li>
</ul>
</footer> <script src="../jquery-3.1.1.min.js"></script>
<script src="../dist/js/bootstrap.js"></script>
</body>

  HTML就是这样!

我这里面还有一个响应布局的代码!是把rem全都转化成px的:

<script>
(function(doc) {
function changeSize() {
var size = doc.documentElement.clientWidth / 320 * 10;
doc.querySelector('html').style.fontSize = size + 'px';
}
window.onresize = changeSize;
changeSize();
})(document)
</script>

 好勒!这就是Bootstrap拟态框结合的支付宝首页!

有什么不明白的,欢迎评论里提问哦!我看到会一一解答的!

Bootstrap拟态框+支付宝首页的更多相关文章

  1. Bootstrap 模态框

    Bootstrap 模态框(也可以说的弹出层) 最近在尝试使用bootstrap的模态框 使用模态框主要要引入一下几个js和css: bootstrap.css jquery.1.9.1.js(这个可 ...

  2. Bootstrap 模态框(也可以说的弹出层)

    最近在尝试使用bootstrap的模态框 使用模态框主要要引入一下几个js和css: bootstrap.css jquery.1.9.1.js(这个可以灵活选择) bootstrap.js html ...

  3. Android RecyclerView 实现支付宝首页效果

    Android RecyclerView 实现支付宝首页效果 [TOC] 虽然我本人不喜欢支付宝的,但是这个网格本身其实还是不错的,项目更新中更改了一个布局为网格模式,类似支付宝.(估计是产品抄袭的= ...

  4. js控制Bootstrap 模态框(Modal)插件

    js控制Bootstrap 模态框(Modal)插件 http://www.cnblogs.com/zzjeny/p/5564400.html

  5. Bootstrap模态框按钮

    1.触发模态框弹窗的代码 这里复制了一段Bootstrap模态框的代码 <h2>创建模态框(Modal)</h2> <!-- 按钮触发模态框 --> <but ...

  6. 解决bootstrap模态框内输入框无法获取焦点

    bootstrap 模态框中的input标签在某些情况下会无法获取焦点. 最终解决方法:去除模态框的 tabindex="-1" 属性即可

  7. Bootstrap 模态框(Modal)插件

    原文链接:http://www.runoob.com/bootstrap/bootstrap-modal-plugin.html Bootstrap 模态框(Modal)插件 模态框(Modal)是覆 ...

  8. Bootstrap 模态框在用户点击背景空白处时会自动关闭

    问题: Bootstrap 模态框在用户点击背景空白处时,会自动关闭. 解决方法: 在HTML页面中编写模态框时,在div初始化时添加属性 aria-hidden=”true” data-backdr ...

  9. Bootstrap模态框(MVC)

    BZ这篇博客主要是为大家介绍一下MVC如何弹出模态框.本文如果有什么不对的地方,希望大神们多多指教,也希望和我一样的小菜多多学习.BZ在这里谢过各位. 首先要在页面加上一个点击事件: @Html.Ac ...

随机推荐

  1. css实现正方形div的3种方式

    网上百度了几种可以按照百分比画方框的方法 1.CSS3 vw 单位 1vw = 1% viewport width <div class="vw">hello,view ...

  2. 小程序tabBar显示问题

    我一直在纠结为什么小程序在有的页面显示,有的页面不显示 查了一下才知道,小程序tabBar只在tabBar中的list定义了页面的才会显示,其余页面不会显示 如下例:tabBar只在画红框的页面显示

  3. 二分答案 & 洛谷 P2678 跳石头

    首先让我们先学一下二分答案这个东西...   二分答案,肯定与二分有关,还与可能是答案的东西有关... 二分答案的准确定义: 二分答案是指在答案具有单调性的前提下,利用二分的思想枚举答案,将求解问题转 ...

  4. redis主从 && 伪群集

    redis主从非常简单,仅需要要从上的配置文件里指定主的IP和端口就可以了.如果主上有密码,则再添加主的密码即可!! slaveof 192.168.15.230 6379 # 添加主上的IP和端口, ...

  5. git 各个区的区别

    Git有三大区(工作区.暂存区.版本库)以及几个状态(untracked.unstaged.uncommited) 把文件往Git版本库里添加的时候,是分两步执行的: 第一步是用 git add 把文 ...

  6. C++_异常1-调用abort()

    异常是相对较新的C++功能,有些老式编译器可能没有实现.另外有些编译器可能默认关闭这一特性,需要使用编译器选项来打开它. 这里先讨论一个基本问题: 2.0 * x * y / (x+y) 如果y是x的 ...

  7. 解决分批次调用 jsonp 接口的 callback 会报错问题

    当我们分批次调用同一个jsonp接口时,会有一定机率同时调用,而jsonp的callback不支持同时调用, 会报错,所以当我们在分批次调用同一jsonp接口时,最好在callback后加个变量值,总 ...

  8. MBR为什么不支持3T硬盘

    MBR,全称为Master Boot Record,即硬盘的主引导记录.(是管理硬盘分区的一种模式.升级版是GPT) MBR保存在硬盘的第1个扇区(即硬盘的0柱面.0磁头.1扇区).它由三个部分组成, ...

  9. 笔记本安装win7和arch linux双系统+xfce4桌面

    参考:Archlinux 2015.07.01 和 Windows7 双系统 安装教程http://www.cnblogs.com/fangying7/p/3803290.html 关于Archlin ...

  10. nodejs的一些学习

    要使用npm的时候,其实是可以直接下载node.js的.参考文档http://www.runoob.com/nodejs/nodejs-npm.html 安装成功之后.判断是否安装成功.是不能直接用n ...