breadcrumb与bootstrap我想让它响应 [英] breadcrumb with bootstrap i want make it responsive

查看:121
本文介绍了breadcrumb与bootstrap我想让它响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想让这个bradcrumb响应所有尺寸我不知道,如果它可以,但我尝试,但没有达到结果,你可以帮助我在bootstrap更新,这是css的面包屑。 / p>

  / * ---------------------------- start ----- breadcrumb ---------------------------------- * /。breadcrumbb {/ * centerering * / display:inline-block; box-shadow:0 0 15px 1px rgba(0,0,0,0.35); / * width:757px; * / overflow:hidden; border-radius:5px; -ms-border-radius:5px; / *允许使用CSS计数器添加每个链接的数字。 flag是计数器的名称。要在链接的父元素中使用counter-reset来定义* / counter-reset:flag;}。breadcrumbb a {/ * width:80px; * / text-align:left;游标:上下文菜单; text-decoration:none; outline:none;显示:block; float:left; font-size:12px; line-height:36px;颜色:白色; / *需要更多的边距左侧的链接来​​容纳数字* / padding:0 10px 0 60px; / * background:#666; * / / * background:linear-gradient(#b89470,#b89470); background:-ms-linear-gradient(top,#b89470,#b89470); / * IE 11 * / background:#dfdfdf; / *旧版浏览器* / background:-moz-linear-gradient(left,#dfdfdf 0%,#dfdfdf 0%,#dfdfdf 0%,#dfdfdf 100%); / * FF3.6 + * /背景:-webkit梯度(线性,左上,右上,颜色停止(0%,#dfdfdf),颜色停止(0%,#dfdfdf) %,#dfdfdf),color-stop(100%,#dfdfdf)); / * Chrome,Safari4 + * / background:-webkit-linear-gradient(left,#dfdfdf 0%,#dfdfdf 0%,#dfdfdf 0%,#dfdfdf 100%); / * Chrome10 +,Safari5.1 + * / background:-o-linear-gradient(left,#dfdfdf 0%,#dfdfdf 0%,#dfdfdf 0%,#dfdfdf 100%); / * Opera 11.10+ * / background:-ms-linear-gradient(left,#dfdfdf 0%,#dfdfdf 0%,#dfdfdf 0%,#dfdfdf 100%); / * IE10 + * / background:linear-gradient(to right,#dfdfdf 0%,#dfdfdf 0%,#dfdfdf 0%,#dfdfdf 100%); / * W3C * / filter:progid:DXImageTransform.Microsoft.gradient(startColorstr ='#dfdfdf',endColorstr ='#dfdfdf',GradientType = 1); / * IE6-9 * / position:relative;} / *由于第一个链接之前没有一个三角形,我们可以减少左边填充,使它看起来与其他链接一致* /。breadcrumbb a:first-child {padding -left:46px; border-radius:5px 0 0 5px; / *匹配父的半径* / padding-right:20px;}。breadcrumbb a:first-child:before {left:14px; text-align:center;}。breadcrumbb a:last-child {border-radius:0 5px 5px 0; / * background:#333; * / * background:linear-gradient(#); * / * 5c3d1f,#5c3d1f); background:-ms-linear-gradient(top,#5c3d1f,#5c3d1f); / * IE 11 * / background:#6b93b7; / *旧浏览器* / background:-moz-linear-gradient(left,#6b93b7 0%,#6b93b7 0%,#6b93b7 0%,#6b93b7 100%); / * FF3.6 + * /背景:-webkit梯度(线性,左上,右上,颜色停止(0%,#6b93b7),停止颜色(0%,#6b93b7) %,#6b93b7),色停(100%,#6b93b7)); / * Chrome,Safari4 + * / background:-webkit-linear-gradient(left,#6b93b7 0%,#6b93b7 0%,#6b93b7 0%,#6b93b7 100%); / * Chrome10 +,Safari5.1 + * / background:-o-线性梯度(左,#6b93b7 0%,#6b93b7 0%,#6b93b7 0%,#6b93b7 100% / * Opera 11.10+ * / background:-ms-linear-gradient(left,#6b93b7 0%,#6b93b7 0%,#6b93b7 0%,#6b93b7 100%); / * IE10 + * /背景:线性梯度(右,#6b93b7 0%,#6b93b7 0%,#6b93b7 0%,#6b93b7 100%); / * W3C * / filter:progid:DXImageTransform.Microsoft.gradient(startColorstr ='#6b93b7',endColorstr ='#6b93b7',GradientType = 1); / * IE6-9 * /}。breadcrumbb a.active:after {/ * background:#333; * / / * background:linear-gradient(135deg,#5c3d1f,#5c3d1f) background:-ms-linear-gradient(top,#5c3d1f,#5c3d1f); / * IE 11 * / background:#6b93b7; / *旧浏览器* / background:-moz-linear-gradient(left,#6b93b7 0%,#6b93b7 0%,#6b93b7 0%,#6b93b7 100%); / * FF3.6 + * /背景:-webkit梯度(线性,左上,右上,颜色停止(0%,#6b93b7),停止颜色(0%,#6b93b7) %,#6b93b7),色停(100%,#6b93b7)); / * Chrome,Safari4 + * / background:-webkit-linear-gradient(left,#6b93b7 0%,#6b93b7 0%,#6b93b7 0%,#6b93b7 100%); / * Chrome10 +,Safari5.1 + * / background:-o-线性梯度(左,#6b93b7 0%,#6b93b7 0%,#6b93b7 0%,#6b93b7 100% / * Opera 11.10+ * / background:-ms-linear-gradient(left,#6b93b7 0%,#6b93b7 0%,#6b93b7 0%,#6b93b7 100%); / * IE10 + * /背景:线性梯度(右,#6b93b7 0%,#6b93b7 0%,#6b93b7 0%,#6b93b7 100%); / * W3C * / filter:progid:DXImageTransform.Microsoft.gradient(startColorstr ='#6b93b7',endColorstr ='#6b93b7',GradientType = 1); / * IE6-9 * /} / *使用旋转伪元素添加面包屑的箭头* /。breadcrumbb a:after {content:''; position:absolute; top:0;右:-18px; / *方形长度的一半* / / *与.breadcrumb的行高相同的尺寸a * / width:36px;高度:36px; / *,因为你看到旋转的正方形需要更大的高度。这使得它难以正确定位。因此,我们将缩小比例,使对角线变得等于链路的线路高度。我们将它缩放到70.7%,因为如果square:length = 1;对角线=(1 ^ 2 + 1 ^ 2)^ 0.5 = 1.414(pythagoras定理)长度= 1 / 1.414 = 0.707 * /变换:标度(0.707)旋转(45度); / *我们需要防止箭头被埋在下一个链接下* / z-index:1; / *背景与链接相同,但是渐变将被旋转以补偿应用的变换* / / * background:#666; * / / * background:linear-gradient(135deg,#b89470,#b89470) background:-ms-linear-gradient(top,#b89470,#b89470); / * IE 11 * / background:#dfdfdf; / *旧版浏览器* / background:-moz-linear-gradient(left,#dfdfdf 0%,#dfdfdf 0%,#dfdfdf 0%,#dfdfdf 100%); / * FF3.6 + * /背景:-webkit梯度(线性,左上,右上,颜色停止(0%,#dfdfdf),颜色停止(0%,#dfdfdf) %,#dfdfdf),color-stop(100%,#dfdfdf)); / * Chrome,Safari4 + * / background:-webkit-linear-gradient(left,#dfdfdf 0%,#dfdfdf 0%,#dfdfdf 0%,#dfdfdf 100%); / * Chrome10 +,Safari5.1 + * / background:-o-linear-gradient(left,#dfdfdf 0%,#dfdfdf 0%,#dfdfdf 0%,#dfdfdf 100%); / * Opera 11.10+ * / background:-ms-linear-gradient(left,#dfdfdf 0%,#dfdfdf 0%,#dfdfdf 0%,#dfdfdf 100%); / * IE10 + * / background:linear-gradient(to right,#dfdfdf 0%,#dfdfdf 0%,#dfdfdf 0%,#dfdfdf 100%); / * W3C * / filter:progid:DXImageTransform.Microsoft.gradient(startColorstr ='#dfdfdf',endColorstr ='#dfdfdf',GradientType = 1); / * IE6-9 * / / *时尚箭头设计使用框阴影* / box-shadow:2px -2px 0 2px rgba(0,0,0,0.4),3px -3px 0 2px rgba(255,255, 0.1); / * 5px  - 用于圆角箭头和50px  - 防止使用阴影创建的边框上的悬停毛刺* / border-radius:0 5px 0 50px; -webkit-border-radius:0 5px 0 50px;} / *我们最后一个链接之后不需要一个箭头* /。breadcrumbb a:last-child:after {content:none;}。notcount {color:#5c3d1f; font-size:13px;} / *我们将使用:before元素显示数字* /。breadcrumbb a:before {content:counter(flag); counter-increment:flag; / *一些样式现在* / border-radius:100%; -webkit-border-radius:100%; text-align:center; / *  -  webkit-border-radius:100%; -moz-border-radius:100%; boundary-radius:100%; * / width:20px; height:20px; line-height:20px; margin:8px 0; position:absolute; top:0; left:30px; / * background:#444; * / / * background:linear-gradient(#5c3d1f,#5c3d1f); background:-ms-linear-gradient(top,#5c3d1f,#5c3d1f); / * IE 11 * / background:#6b93b7; / *旧浏览器* / background:-moz-linear-gradient(left,#6b93b7 0%,#6b93b7 0%,#6b93b7 0%,#6b93b7 100%); / * FF3.6 + * /背景:-webkit梯度(线性,左上,右上,颜色停止(0%,#6b93b7),停止颜色(0%,#6b93b7) %,#6b93b7),色停(100%,#6b93b7)); / * Chrome,Safari4 + * / background:-webkit-linear-gradient(left,#6b93b7 0%,#6b93b7 0%,#6b93b7 0%,#6b93b7 100%); / * Chrome10 +,Safari5.1 + * / background:-o-线性梯度(左,#6b93b7 0%,#6b93b7 0%,#6b93b7 0%,#6b93b7 100% / * Opera 11.10+ * / background:-ms-linear-gradient(left,#6b93b7 0%,#6b93b7 0%,#6b93b7 0%,#6b93b7 100%); / * IE10 + * /背景:线性梯度(右,#6b93b7 0%,#6b93b7 0%,#6b93b7 0%,#6b93b7 100%); / * W3C * / filter:progid:DXImageTransform.Microsoft.gradient(startColorstr ='#6b93b7',endColorstr ='#6b93b7',GradientType = 1); / * IE6-9 * / font-weight:bold;}。flat a,.flat a:after {background:white;颜色:黑色; transition:all 0.5s;} flat a:before {background:white; box-shadow:0 0 0 1px #ccc;}。flat a:hover,.flat a.active,.flat a:hover:after,.flat a.active:after {background:#9EEB62;} / *  - --------------------------结束----- breadcrumb ----------------- ----------------- * /  

 < div class =col-xs-10 col-sm-8 col-md-8 col-lg-8style =background-color:#dfdfdf; padding:6px 27px 20px 27px ;> < div class =row> < div class =col-xs-12 col-sm-11 col-md-11 col-lg-11> < div class =breadcrumbbstyle =position:relative; top:-2px;> < a href =#style =class =active>选择< / a> < a href =#style =>添加服务< / a> < a href =#style =>登录< / a> < a href =#style =>摘要< / a> < a href =#style =>确认< / a> < / div> < / div> < / div>< / div>  

解决方案

使用媒体查询并撰写所需的CSS。



下面列出了不同的断点(来源

  / *智能手机--------- * / 

@media only screen and(min-device-width:320px)and(max-device-width:480px){
/ *样式* /
}
/ *智能手机(横向)----------- * /

@media只有屏幕和(最小宽度:321像素){
/ * Stylees * /
}
/ *智能手机(肖像)----------- * /

@media screen and(max-width:320px){
/ * Styles * /
}
/ * iPads(纵向和横向)----------- * /

@media only screen and(min-device-width:768px)and(max-device-width:1024px){
/ * Styles * /
}
/ * iPads(横向)----------- * /

@media only screen and(min-device-width:768px)and(max-device-width:1024px )和(orientation:landscape){
/ *样式* /
}
/ * iPads(portrait)----------- * /

@media only screen and(min-device-width:768px)and(max-device-width:1024px)and(orientation:portrait){
/ * Styles * /
}
/ **********
iPad 3
********** /

@media只有屏幕和(min- device-width:768px)and(max-device-width:1024px)and(orientation:landscape)and(-webkit-min-device-pixel-ratio:2){
/ * Styles * /
}
@media only screen and(min-device-width:768px)and(max-device-width:1024px)and(orientation:portrait)and(-webkit-min-device-pixel-ratio:2 ){
/ *样式* /
}
/ *台式机和笔记本电脑----------- * /

@media和(min-width:1224px){
/ *样式* /
}
/ *大屏幕----------- * /

@media only screen and(min-width:1824px){
/ * Styles * /
}
/ * iPhone 4 ----------- *

@media only screen and(min-device-width:320px)and(max-device-width:480px)and(orientation:landscape)and(-webkit-min-device-pixel- :2){
/ * Styles * /
}
@media only screen and(min-device-width:320px)and(max-device-width:480px)and(orientation:肖像)和(-webkit-min-device-pixel-ratio:2){
/ *样式* /
}
/ * iPhone 5 ---------- - * /

@media only screen and(min-device-width:320px)and(max-device-height:568px)and(orientation:landscape)and(-webkit-device-pixel- ratio:2){
/ * Styles * /
}
@media only screen and(min-device-width:320px)and(max-device-height:568px)and :portrait)and(-webkit-device-pixel-ratio:2){
/ * Styles * /
}
/ * iPhone 6 ----------- * /

@media only screen and(min-device-width:375px)and(max-device-height:667px)and(orientation:landscape)and(-webkit-device-pixel-ratio :2){
/ * Styles * /
}
@media only screen and(min-device-width:375px)and(max-device-height:667px)and肖像)和(-webkit-device-pixel-ratio:2){
/ *样式* /
}
/ * iPhone 6+ ----------- * /

@media only screen and(min-device-width:414px)and(max-device-height:736px)and(orientation:landscape)and(-webkit-device-pixel-ratio :2){
/ * Styles * /
}
@media only screen and(min-device-width:414px)and(max-device-height:736px)and 3)三星Galaxy S3 ----------- - - - - - - - - - - - - - - - - * /

@media only screen and(min-device-width:320px)and(max-device-height:640px)and(orientation:landscape)and(-webkit-device-pixel-ratio :2){
/ * Styles * /
}
@media only screen and(min-device-width:320px)and(max-device-height:640px)and(orientation:肖像)和(-webkit设备像素比:2){
/ *风格* /
}
/ *三星Galaxy S4 ----------- * /

@media only screen and(min-device-width:320px)and(max-device-height:640px)and(orientation:landscape)and(-webkit-device-pixel-ratio :3){
/ * Styles * /
}
@media only screen and(min-device-width:320px)and(max-device-height:640px)and(orientation: 3){
/ *样式* /
}
/ *三星Galaxy S5 ----------- * /

@media only screen and(min-device-width:360px)and(max-device-height:640px)and(orientation:landscape)and(-webkit-device-pixel-ratio :3){
/ * Styles * /
}
@media only screen and(min-device-width:360px)and(max-device-height:640px)and(orientation:肖像)和(-webkit-device-pixel-ratio:3){
/ *样式* /
}


I want to make this bradcrumb responsive with the all sizes i don't know if it can but i am tried but not reach to result can you help me i am fresher on bootstrap , this is the css for the breadcrumb .

/*----------------------------start-----breadcrumb----------------------------------*/

.breadcrumbb {
  /*centering*/
  display: inline-block;
  box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.35);
  /*width: 757px;*/
  overflow: hidden;
  border-radius: 5px;
  -ms-border-radius: 5px;
  /*Lets add the numbers for each link using CSS counters. flag is the name of the counter. to be defined using counter-reset in the parent element of the links*/
  counter-reset: flag;
}
.breadcrumbb a {
  /*width: 80px;*/
  text-align: left;
  cursor: context-menu;
  text-decoration: none;
  outline: none;
  display: block;
  float: left;
  font-size: 12px;
  line-height: 36px;
  color: white;
  /*need more margin on the left of links to accomodate the numbers*/
  padding: 0 10px 0 60px;
  /*background: #666;*/
  /*background: linear-gradient(#b89470, #b89470);
    background: -ms-linear-gradient(top, #b89470, #b89470); /* IE 11 */
  background: #dfdfdf;
  /* Old browsers */
  background: -moz-linear-gradient(left, #dfdfdf 0%, #dfdfdf 0%, #dfdfdf 0%, #dfdfdf 100%);
  /* FF3.6+ */
  background: -webkit-gradient(linear, left top, right top, color-stop(0%, #dfdfdf), color-stop(0%, #dfdfdf), color-stop(0%, #dfdfdf), color-stop(100%, #dfdfdf));
  /* Chrome,Safari4+ */
  background: -webkit-linear-gradient(left, #dfdfdf 0%, #dfdfdf 0%, #dfdfdf 0%, #dfdfdf 100%);
  /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(left, #dfdfdf 0%, #dfdfdf 0%, #dfdfdf 0%, #dfdfdf 100%);
  /* Opera 11.10+ */
  background: -ms-linear-gradient(left, #dfdfdf 0%, #dfdfdf 0%, #dfdfdf 0%, #dfdfdf 100%);
  /* IE10+ */
  background: linear-gradient(to right, #dfdfdf 0%, #dfdfdf 0%, #dfdfdf 0%, #dfdfdf 100%);
  /* W3C */
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#dfdfdf ', endColorstr='#dfdfdf ', GradientType=1);
  /* IE6-9 */
  position: relative;
}
/*since the first link does not have a triangle before it we can reduce the left padding to make it look consistent with other links*/

.breadcrumbb a:first-child {
  padding-left: 46px;
  border-radius: 5px 0 0 5px;
  /*to match with the parent's radius*/
  padding-right: 20px;
}
.breadcrumbb a:first-child:before {
  left: 14px;
  text-align: center;
}
.breadcrumbb a:last-child {
  border-radius: 0 5px 5px 0;
  /*this was to prevent glitches on hover*/
  padding-right: 20px;
}
/*hover/active styles*/

.breadcrumbb a.active {
  /*background: #333;*/
  /*background: linear-gradient(#5c3d1f, #5c3d1f);
    background: -ms-linear-gradient(top, #5c3d1f, #5c3d1f); /* IE 11 */
  background: #6b93b7;
  /* Old browsers */
  background: -moz-linear-gradient(left, #6b93b7 0%, #6b93b7 0%, #6b93b7 0%, #6b93b7 100%);
  /* FF3.6+ */
  background: -webkit-gradient(linear, left top, right top, color-stop(0%, #6b93b7), color-stop(0%, #6b93b7), color-stop(0%, #6b93b7), color-stop(100%, #6b93b7));
  /* Chrome,Safari4+ */
  background: -webkit-linear-gradient(left, #6b93b7 0%, #6b93b7 0%, #6b93b7 0%, #6b93b7 100%);
  /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(left, #6b93b7 0%, #6b93b7 0%, #6b93b7 0%, #6b93b7 100%);
  /* Opera 11.10+ */
  background: -ms-linear-gradient(left, #6b93b7 0%, #6b93b7 0%, #6b93b7 0%, #6b93b7 100%);
  /* IE10+ */
  background: linear-gradient(to right, #6b93b7 0%, #6b93b7 0%, #6b93b7 0%, #6b93b7 100%);
  /* W3C */
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#6b93b7 ', endColorstr='#6b93b7 ', GradientType=1);
  /* IE6-9 */
}
.breadcrumbb a.active:after {
  /*background: #333;*/
  /*background: linear-gradient(135deg, #5c3d1f, #5c3d1f);
    background: -ms-linear-gradient(top, #5c3d1f, #5c3d1f); /* IE 11 */
  background: #6b93b7;
  /* Old browsers */
  background: -moz-linear-gradient(left, #6b93b7 0%, #6b93b7 0%, #6b93b7 0%, #6b93b7 100%);
  /* FF3.6+ */
  background: -webkit-gradient(linear, left top, right top, color-stop(0%, #6b93b7), color-stop(0%, #6b93b7), color-stop(0%, #6b93b7), color-stop(100%, #6b93b7));
  /* Chrome,Safari4+ */
  background: -webkit-linear-gradient(left, #6b93b7 0%, #6b93b7 0%, #6b93b7 0%, #6b93b7 100%);
  /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(left, #6b93b7 0%, #6b93b7 0%, #6b93b7 0%, #6b93b7 100%);
  /* Opera 11.10+ */
  background: -ms-linear-gradient(left, #6b93b7 0%, #6b93b7 0%, #6b93b7 0%, #6b93b7 100%);
  /* IE10+ */
  background: linear-gradient(to right, #6b93b7 0%, #6b93b7 0%, #6b93b7 0%, #6b93b7 100%);
  /* W3C */
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#6b93b7', endColorstr='#6b93b7', GradientType=1);
  /* IE6-9 */
}
/*adding the arrows for the breadcrumbs using rotated pseudo elements*/

.breadcrumbb a:after {
  content: '';
  position: absolute;
  top: 0;
  right: -18px;
  /*half of square's length*/
  /*same dimension as the line-height of .breadcrumb a */
  width: 36px;
  height: 36px;
  /*as you see the rotated square takes a larger height. which makes it tough to position it properly. So we are going to scale it down so that the diagonals become equal to the line-height of the link. We scale it to 70.7% because if square's: 
	length = 1; diagonal = (1^2 + 1^2)^0.5 = 1.414 (pythagoras theorem)
	if diagonal required = 1; length = 1/1.414 = 0.707*/
  transform: scale(0.707) rotate(45deg);
  /*we need to prevent the arrows from getting buried under the next link*/
  z-index: 1;
  /*background same as links but the gradient will be rotated to compensate with the transform applied*/
  /*background: #666;*/
  /*background: linear-gradient(135deg, #b89470, #b89470);
    background: -ms-linear-gradient(top, #b89470, #b89470); /* IE 11 */
  background: #dfdfdf;
  /* Old browsers */
  background: -moz-linear-gradient(left, #dfdfdf 0%, #dfdfdf 0%, #dfdfdf 0%, #dfdfdf 100%);
  /* FF3.6+ */
  background: -webkit-gradient(linear, left top, right top, color-stop(0%, #dfdfdf), color-stop(0%, #dfdfdf), color-stop(0%, #dfdfdf), color-stop(100%, #dfdfdf));
  /* Chrome,Safari4+ */
  background: -webkit-linear-gradient(left, #dfdfdf 0%, #dfdfdf 0%, #dfdfdf 0%, #dfdfdf 100%);
  /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(left, #dfdfdf 0%, #dfdfdf 0%, #dfdfdf 0%, #dfdfdf 100%);
  /* Opera 11.10+ */
  background: -ms-linear-gradient(left, #dfdfdf 0%, #dfdfdf 0%, #dfdfdf 0%, #dfdfdf 100%);
  /* IE10+ */
  background: linear-gradient(to right, #dfdfdf 0%, #dfdfdf 0%, #dfdfdf 0%, #dfdfdf 100%);
  /* W3C */
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#dfdfdf', endColorstr='#dfdfdf', GradientType=1);
  /* IE6-9 */
  /*stylish arrow design using box shadow*/
  box-shadow: 2px -2px 0 2px rgba(0, 0, 0, 0.4), 3px -3px 0 2px rgba(255, 255, 255, 0.1);
  /*
		5px - for rounded arrows and 
		50px - to prevent hover glitches on the border created using shadows*/
  border-radius: 0 5px 0 50px;
  -webkit-border-radius: 0 5px 0 50px;
}
/*we dont need an arrow after the last link*/

.breadcrumbb a:last-child:after {
  content: none;
}
.notcount {
  color: #5c3d1f;
  font-size: 13px;
}
/*we will use the :before element to show numbers*/

.breadcrumbb a:before {
  content: counter(flag);
  counter-increment: flag;
  /*some styles now*/
  border-radius: 100%;
  -webkit-border-radius: 100%;
  text-align: center;
  /*-webkit-border-radius: 100%;
    -moz-border-radius: 100%;
    border-radius: 100%;*/
  width: 20px;
  height: 20px;
  line-height: 20px;
  margin: 8px 0;
  position: absolute;
  top: 0;
  left: 30px;
  /*background: #444;*/
  /*background: linear-gradient(#5c3d1f, #5c3d1f);
    background: -ms-linear-gradient(top, #5c3d1f, #5c3d1f); /* IE 11*/
  background: #6b93b7;
  /* Old browsers */
  background: -moz-linear-gradient(left, #6b93b7 0%, #6b93b7 0%, #6b93b7 0%, #6b93b7 100%);
  /* FF3.6+ */
  background: -webkit-gradient(linear, left top, right top, color-stop(0%, #6b93b7), color-stop(0%, #6b93b7), color-stop(0%, #6b93b7), color-stop(100%, #6b93b7));
  /* Chrome,Safari4+ */
  background: -webkit-linear-gradient(left, #6b93b7 0%, #6b93b7 0%, #6b93b7 0%, #6b93b7 100%);
  /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(left, #6b93b7 0%, #6b93b7 0%, #6b93b7 0%, #6b93b7 100%);
  /* Opera 11.10+ */
  background: -ms-linear-gradient(left, #6b93b7 0%, #6b93b7 0%, #6b93b7 0%, #6b93b7 100%);
  /* IE10+ */
  background: linear-gradient(to right, #6b93b7 0%, #6b93b7 0%, #6b93b7 0%, #6b93b7 100%);
  /* W3C */
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#6b93b7', endColorstr='#6b93b7', GradientType=1);
  /* IE6-9 */
  font-weight: bold;
}
.flat a,
.flat a:after {
  background: white;
  color: black;
  transition: all 0.5s;
}
.flat a:before {
  background: white;
  box-shadow: 0 0 0 1px #ccc;
}
.flat a:hover,
.flat a.active,
.flat a:hover:after,
.flat a.active:after {
  background: #9EEB62;
}
/*----------------------------End-----breadcrumb----------------------------------*/

<div class="col-xs-10 col-sm-8 col-md-8 col-lg-8" style="background-color: #dfdfdf; padding: 6px 27px 20px 27px;">
  <div class="row">
    <div class="col-xs-12 col-sm-11 col-md-11 col-lg-11">
      <div class="breadcrumbb" style="position: relative; top: -2px;">
        <a href="#" style="" class="active">Select</a>
        <a href="#" style="">Add services</a>
        <a href="#" style="">Login</a>
        <a href="#" style="">Summary</a>
        <a href="#" style="">Confirmation</a>
      </div>
    </div>
  </div>
</div>

解决方案

Use Media Queries and write the required CSS.

Different breakpoints are listed below (Source)

/* Smartphones (portrait and landscape) ----------- */

@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
  /* Styles */
}
/* Smartphones (landscape) ----------- */

@media only screen and (min-width: 321px) {
  /* Styles */
}
/* Smartphones (portrait) ----------- */

@media only screen and (max-width: 320px) {
  /* Styles */
}
/* iPads (portrait and landscape) ----------- */

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
  /* Styles */
}
/* iPads (landscape) ----------- */

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {
  /* Styles */
}
/* iPads (portrait) ----------- */

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) {
  /* Styles */
}
/**********
iPad 3
**********/

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 2) {
  /* Styles */
}
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2) {
  /* Styles */
}
/* Desktops and laptops ----------- */

@media only screen and (min-width: 1224px) {
  /* Styles */
}
/* Large screens ----------- */

@media only screen and (min-width: 1824px) {
  /* Styles */
}
/* iPhone 4 ----------- */

@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 2) {
  /* Styles */
}
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2) {
  /* Styles */
}
/* iPhone 5 ----------- */

@media only screen and (min-device-width: 320px) and (max-device-height: 568px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2) {
  /* Styles */
}
@media only screen and (min-device-width: 320px) and (max-device-height: 568px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2) {
  /* Styles */
}
/* iPhone 6 ----------- */

@media only screen and (min-device-width: 375px) and (max-device-height: 667px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2) {
  /* Styles */
}
@media only screen and (min-device-width: 375px) and (max-device-height: 667px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2) {
  /* Styles */
}
/* iPhone 6+ ----------- */

@media only screen and (min-device-width: 414px) and (max-device-height: 736px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2) {
  /* Styles */
}
@media only screen and (min-device-width: 414px) and (max-device-height: 736px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2) {
  /* Styles */
}
/* Samsung Galaxy S3 ----------- */

@media only screen and (min-device-width: 320px) and (max-device-height: 640px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2) {
  /* Styles */
}
@media only screen and (min-device-width: 320px) and (max-device-height: 640px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2) {
  /* Styles */
}
/* Samsung Galaxy S4 ----------- */

@media only screen and (min-device-width: 320px) and (max-device-height: 640px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 3) {
  /* Styles */
}
@media only screen and (min-device-width: 320px) and (max-device-height: 640px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 3) {
  /* Styles */
}
/* Samsung Galaxy S5 ----------- */

@media only screen and (min-device-width: 360px) and (max-device-height: 640px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 3) {
  /* Styles */
}
@media only screen and (min-device-width: 360px) and (max-device-height: 640px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 3) {
  /* Styles */
}

这篇关于breadcrumb与bootstrap我想让它响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆