响应式框架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 相关文章推荐
JS类的封装及实现代码
Dec 02 Javascript
从URL中提取参数与将对象转换为URL查询参数的实现代码
Jan 12 Javascript
js中return false(阻止)的用法
Aug 14 Javascript
Js制作点击输入框时默认文字消失的效果
Sep 05 Javascript
jQuery ajax MD5实现用户注册即时验证功能
Oct 11 Javascript
JS身份证信息验证正则表达式
Jun 12 Javascript
利用node.js实现自动生成前端项目组件的方法详解
Jul 12 Javascript
Vue中如何实现轮播图的示例代码
Jul 27 Javascript
在 Angular 中使用Chart.js 和 ng2-charts的示例代码
Aug 17 Javascript
vue实现在表格里,取每行的id的方法
Mar 09 Javascript
Vue动态生成el-checkbox点击无法赋值的解决方法
Feb 21 Javascript
VUE 直接通过JS 修改html对象的值导致没有更新到数据中解决方法分析
Dec 02 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
PHP isset()与empty()的使用区别详解
2010/08/29 PHP
php简单实现屏蔽指定ip段用户的访问
2015/04/29 PHP
php intval函数用法总结
2019/04/14 PHP
微信推送功能实现方式图文详解
2019/07/12 PHP
Javascript动态绑定事件的简单实现代码
2010/12/25 Javascript
浅谈JavaScript编程语言的编码规范
2011/10/21 Javascript
jquery自动切换tabs选项卡的具体实现
2013/12/24 Javascript
JS判断两个时间大小的示例代码
2014/01/28 Javascript
JS+CSS实现表格高亮的方法
2015/08/05 Javascript
纯javascript实现分页(两种方法)
2015/08/26 Javascript
JS+CSS实现的经典tab选项卡效果代码
2015/09/16 Javascript
JavaScript setTimeout使用闭包功能实现定时打印数值
2015/12/18 Javascript
Window.Open打开窗体和if嵌套代码
2016/04/15 Javascript
给vue项目添加ESLint的详细步骤
2017/09/29 Javascript
在react中使用vuex的示例代码
2018/07/30 Javascript
js实现web调用摄像头 js截取视频画面
2019/04/21 Javascript
Vue组件模板的几种书写形式(3种)
2020/02/19 Javascript
vue 图片裁剪上传组件的实现
2020/11/12 Javascript
Vue 集成 PDF.js 实现 PDF 预览和添加水印的步骤
2021/01/22 Vue.js
[20:57]Ti4主赛事第三天开幕式
2014/07/21 DOTA
[47:03]完美世界DOTA2联赛PWL S3 Galaxy Racer vs Phoenix 第二场 12.10
2020/12/13 DOTA
python实现读取并显示图片的两种方法
2017/01/13 Python
Python使用django搭建web开发环境
2017/06/09 Python
解决pycharm运行时interpreter为空的问题
2018/10/29 Python
Python实现爬取亚马逊数据并打印出Excel文件操作示例
2019/05/16 Python
python 随机生成10位数密码的实现代码
2019/06/27 Python
如何用Python做一个微信机器人自动拉群
2019/07/03 Python
python 实现12bit灰度图像映射到8bit显示的方法
2019/07/08 Python
Python二元赋值实用技巧解析
2019/10/25 Python
Django实现从数据库中获取到的数据转换为dict
2020/03/27 Python
python实现文件+参数发送request的实例代码
2021/01/05 Python
Linux如何为某个操作添加别名
2013/03/01 面试题
安全员岗位职责范本
2015/04/11 职场文书
2019关于实习生工作安排及待遇的管理方案!
2019/07/16 职场文书
pytorch显存一直变大的解决方案
2021/04/08 Python
python DataFrame中stack()方法、unstack()方法和pivot()方法浅析
2022/04/06 Python