响应式框架Bootstrap栅格系统的实例


Posted in Javascript onDecember 19, 2017

实例如下:

<!DOCTYPE html>
<html>
<head lang="en">
 <meta charset="UTF-8">
 <title></title>
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <link rel="stylesheet" href="css/bootstrap.min.css" rel="external nofollow" />
 <script language="JavaScript" src="js/jquery-3.js"></script>
 <style type="text/css">
  *{
   top: 0px;
   padding: 0px;
   text-decoration: none;
   list-style-type: none;
  }

  .top-styl{
   height: 50px;
   border: 1px solid red;
   background-color: #000000;
  }
  .img-styl{
   width: 174px;
   height: 50px;
   background: url("imges/logo.png")no-repeat 0px 3px;
   background-size: contain;
   float: left;
  }
  .sousuo-styl{
   width: 187px;
   float: left;
  }
  .top-search-input{
   width: 150px;
   padding: 0 5px;
   height: 30px;
   border: 0;
   background: #363636;
   float: left;
   color: #ccc;
  }
  .top-search-submit{
   width: 30px;
   height: 30px;
   border: 0;
   background: green url("imges/zoom.gif")center center no-repeat;
   float: left;
   cursor: pointer;



//光标指针
  }
  .dao-styll{
   float: left;
   font-size: 16px;
   width: 329px;
   margin-left: 33px;
   margin-top: 11px;

  }
  .dao-styll li{
   float: left;
   position: relative;


//相对定位
   text-align: center;
   padding: 0 7px;
  }
  .dao-styll >li:hover{
   background-color: #999;
  }
  .dao-styll >li >a{
   color: #FFF;
   width: 100%;
   height: 34px;
   text-decoration: none;

//取消下划线
  }
  .dz-styl{
   float: right;
   margin: -19px -9px 6px 21px;
  }
  .imgs-styl{
   padding: 11px 0px 0px 114px;
   float: right;
   margin: 0px -98px -3px 8px;
  }
  .green-styl{
   color: green;
  }
  .zc-styl{
   color: white;
  }
  a{
   text-decoration: none;
  }
 </style>
</head>
<body>
 <div class="container-fluid"> 




//fluid表示用 百分比
  <div class="row">






 //row 行
   <div class="top-styl col-md-12">



//col-md-12 每行桌面占12列
    <div class="row">
     <div class=" col-md-offset-1 col-md-9">
 //col-md-offset-1 列偏移1列
      <div class="row">
      <div class="col-md-3 col-xs-4">
       <div class="img-styl"></div>
      </div>
       <div class="col-md-3 ">
        <div class="sousuo-styl" style="padding-left: 7px; margin: 8px auto;">
         <input class="top-search-input" value="" type="text"><input
          class="top-search-submit" type="submit" value="" />
        </div>
       </div>
       <div class="col-md-4 hidden-xs" style="padding: 0px">
        <ul class="dao-styll">
         <li class=""><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >风格</a>
         </li>
         <li class=""><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >造型师</a></li>
         <li class=""><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >众分享</a>
         </li>
         <li class=""><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >我的美丽衣橱</a></li>
        </ul>
       </div>
       <div class="col-md-2">
        <div class="imgs-styl">
         <img src="imges/sina.gif">
        </div>
        <div class="dz-styl">
         <span><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="green-styl">登录</a> | </span><span>
         <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="zc-styl">注册</a></span>
        </div>
       </div>


      </div>
     </div>
    </div>
   </div>
  </div>

 <div class="row">
    <div class="visible-md"><h1>当前为桌面显示</h1></div>
 //visible默认占满整行 
    <div class="visible-sm"><h1>当前为平面显示</h1></div>
    <div class="visible-xs"><h1>当前为手机显示</h1></div>
  </div>
 </div>
</body>
</html>

效果显示图:

响应式框架Bootstrap栅格系统的实例

响应式框架Bootstrap栅格系统的实例

 响应式框架Bootstrap栅格系统的实例

以上这篇响应式框架Bootstrap栅格系统的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持三水点靠木。

Javascript 相关文章推荐
jquery通过select列表选择框对表格数据进行过滤示例
May 07 Javascript
JS实现根据当前文字选择返回被选中的文字
May 21 Javascript
Jquery中基本选择器用法实例详解
May 18 Javascript
通过实例理解javascript中没有函数重载的概念
Jun 03 Javascript
tuzhu_req.js 实现仿百度图片首页效果
Aug 11 Javascript
JavaScript拖拽、碰撞、重力及弹性运动实例分析
Jan 08 Javascript
JavaScript实现简单的日历效果
Sep 25 Javascript
JavaScript获取服务器端时间的方法
Nov 29 Javascript
详解tween.js的使用教程
Sep 14 Javascript
vue渲染时闪烁{{}}的问题及解决方法
Mar 28 Javascript
详解iframe跨域的几种常用方法(小结)
Apr 29 Javascript
JavaScript中的惰性载入函数及优势
Feb 18 Javascript
vue.js element-ui validate中代码不执行问题解决方法
Dec 18 #Javascript
AngularJs点击状态值改变背景色的实例
Dec 18 #Javascript
jQuery实现点击DIV同时点击CheckBox,并为DIV上背景色的实例
Dec 18 #jQuery
JS实现点击复选框变更DIV显示状态的示例代码
Dec 18 #Javascript
Vue下的国际化处理方法
Dec 18 #Javascript
webpack多页面开发实践
Dec 18 #Javascript
Vue侧滑菜单组件——DrawerLayout
Dec 18 #Javascript
You might like
window+nginx+php环境配置 附配置搭配说明
2010/12/29 PHP
浅析php中三个等号(===)和两个等号(==)的区别
2013/08/06 PHP
php阿拉伯数字转中文人民币大写
2015/12/21 PHP
异步加载script的代码
2011/01/12 Javascript
深入理解js数组的sort排序
2016/05/28 Javascript
JavaScript学习笔记整理_setTimeout的应用
2016/09/19 Javascript
vue.js通过自定义指令实现数据拉取更新的实现方法
2016/10/18 Javascript
jQuery EasyUI Draggable拖动组件
2017/03/01 Javascript
前端开发之CSS原理详解
2017/03/11 Javascript
Node.js学习教程之HTTP/2服务器推送【译】
2017/10/31 Javascript
基于jQuery解决ios10以上版本缩放问题
2017/11/03 jQuery
js 判断当前时间是否处于某个一个时间段内
2019/09/19 Javascript
ES6 Iterator遍历器原理,应用场景及相关常用知识拓展详解
2020/02/15 Javascript
javascript实现拼图游戏
2021/01/29 Javascript
[01:00:13]完美世界DOTA2联赛 LBZS vs Forest 第一场 11.07
2020/11/09 DOTA
Python中为feedparser设置超时时间避免堵塞
2014/09/28 Python
python实现bucket排序算法实例分析
2015/05/04 Python
pandas 小数位数 精度的处理方法
2018/06/09 Python
python-opencv颜色提取分割方法
2018/12/08 Python
selenium+PhantomJS爬取豆瓣读书
2019/08/26 Python
Pytorch修改ResNet模型全连接层进行直接训练实例
2019/09/10 Python
python画图常规设置方式
2020/03/05 Python
Python run()函数和start()函数的比较和差别介绍
2020/05/03 Python
树莓派升级python的具体步骤
2020/07/05 Python
如何在python中判断变量的类型
2020/07/29 Python
HTML5+CSS3绘制锯齿状的矩形
2016/03/01 HTML / CSS
泰国的头号网上婴儿用品店:Motherhood.co.th
2019/04/09 全球购物
美国电子产品购物网站:BuyDig.com
2020/06/17 全球购物
《胡杨》教学反思
2014/02/16 职场文书
教师网络培训感言
2014/03/09 职场文书
自动化专业大学生职业生涯规划范文:爱拚才会赢
2014/09/12 职场文书
乡镇干部先进性教育活动个人整改措施
2014/09/16 职场文书
单方投资意向书
2015/05/11 职场文书
社会心理学学习心得体会
2016/01/22 职场文书
2019入党申请书格式
2019/06/25 职场文书
喜迎建国70周年:有关爱国的名言名句
2019/09/24 职场文书