响应式框架Bootstrap栅格系统
<!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"/>
<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="#">风格</a>
</li>
<li class=""><a href="#">造型师</a></li>
<li class=""><a href="#">众分享</a>
</li>
<li class=""><a href="#">我的美丽衣橱</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="#" class="green-styl">登录</a> | </span><span>
<a href="#" 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 提供了一套响应式.移动设备优先的流式栅格系统,随着屏幕或视口(viewport)尺寸的增加,系统会自动分为最多12列.它包含了易于使用的预定义类,还有强大的mix ...
- Bootstrap4响应式布局之栅格系统
前面说了Bootstrap4的下载和简单使用,现在我们接着往下学习,Bootstrap4的响应式布局主要依靠栅格系统来实现的.面老K先来讲解一下Bootstrap4的栅格系统,让你能够更快的了解Boo ...
- 响应式框架Bootstrap
概念:Bootstrap将会根据你的屏幕的大小来调整HTML元素的大小 -- 强调 响应式设计的概念. 通过响应式设计,你无需再为你的网站设计一个手机版的.它在任何尺寸的屏幕上看起来都会不错. Boo ...
- fcc 响应式框架Bootstrap 练习2
text-primary 属性值使标题直接变成了红色,text-center使标题直接居中 <h2 class="text-primary text-center"> ...
- bootstrap第一天,响应式布局,栅格系统运用
<!DOCTYPE html><html lang="zh-CN"> <head> <meta charset="utf-8&q ...
- fcc 响应式框架Bootstrap 练习1
需要通过添加下列代码到你的HTML开头来将Bootstrap添加到任意应用中: <link rel="stylesheet" href="//cdn.bootcss ...
- fcc 响应式框架Bootstrap 练习3
class="container-fluid"控制宽度100% <div class="container-fluid"> <h3 class ...
- 【响应式】foundation栅格布局的“尝鲜”与“填坑”
提到响应式,就不得不提两个响应式框架--bootstrap和foundation.在标题上我已经说明白啦,今天给大家介绍的是foundation框架. 何为"尝鲜"?就是带大伙 ...
- 巧用 BootStrap --- 栅格系统(布局)轻松搞定网页响应式布局!
摘要:Bootstrap 为我们提供了一套响应式.移动设备优先的流式栅格系统,合理的使用栅格系统将会使得网站页面布局变得更加简单,在设置了媒体查询之后,响应式网站也无需再单独写了.接下来我以Boots ...
随机推荐
- 使用mitmproxy嗅探双向认证ssl链接——嗅探AWS IoT SDK的mqtts
亚马逊AWS IoT使用MQTTS(在TLS上的MQTT)来提供物联网设备与云平台直接的通信功能.出于安全考虑,建议给每个设备配备了证书来认证,同时,设备也要安装亚马逊的根证书:这样,在使用8883端 ...
- Linux安装nginx代理服务器
Nginx("engine x")是一款是由俄罗斯的程序设计师Igor Sysoev所开发高性能的 Web和 反向代理 服务器,也是一个 IMAP/POP3/SMTP 代理服务器. ...
- 2000W条数据,加入全文检索的总结
一) 前期准备测试: 旧版的MySQL的全文索引只能用在MyISAM表格的char.varchar和text的字段上. 不过新版的MySQL5.6.24上InnoDB引擎也加入了全文索引,所以具体信息 ...
- 如何让只支持IE浏览器的jsp转为可以支持chrome
如果你的项目只能使用IE浏览器打开,你想让其支持chrome的话,可以试一下下面的代码哦: function showLayerDialog(url,paramFuction){ top.layer. ...
- Struts2开发文档
struts2配置 struts2核心配置文件约束 <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts ...
- selenium_Alert
网页测试,最避免不了的就是弹出框,但是弹出框你真的分的清吗? Alert prompt comfirm 先来认识一下这三个弹窗 代码如下 <!DOCTYPE html> <html ...
- 史上最完整的PS快捷键(绝对经典)
快速恢复默认值 有些不擅长Photoshop的朋友为了调整出满意的效果真是几经周折,结果发现还是原来的默认效果最好,这下傻了眼,后悔不该当初呀!怎么恢复到默认值呀?试着轻轻点按选项栏上的工具图标,然后 ...
- 非确定性计算引擎转化为C#版本并重构
这是之前我写的原始的 VB.NET 版本: http://www.cnblogs.com/RChen/archive/2010/05/17/1737587.html 转化为 C# 版本后,还进行了一些 ...
- Python概述与安装
Python 一门面向对象的解释性语言. Python优点 开发效率高(有丰富的各种类库,不需要重复造轮子):可移植性:解释性:免费开源:交互式(IDLE,代码写一行执行一行) Python缺点 相对 ...
- 搭建ntp时间服务器 ntp - (Network Time Protocol)
第1章 ntp 1.1 ntp简介 NTP(Network Time Protocol,网络时间协议)是用来使网络中的各个计算机时间同步的一种协议.它的用途是把计算机的时钟同步到世界协调 ...