我有这些Bootstrap药片我正试图开始工作,我的例子如下:
https://dynamic-shipping-fixed-trimakas.c9users.io/#settings
我增加了字体的大小,这会抛出盒子的大小并创建“阶梯式”外观,箭头形状不再是盒子的全尺寸了......我一直在努力修复它,不能,我的CSS技能不太理想..
我改变了body
中的字体大小,我很确定这是受影响的CSS,但我似乎无法修复它。
*::before, *::after {
box-sizing: border-box;
}
*::before, *::after {
box-sizing: border-box;
}
.nav-pills.nav-wizard > li + li {
margin-left: 0;
}
.nav-pills.nav-wizard > li {
border-left: 15px solid transparent;
border-right: 15px solid transparent;
overflow: visible;
position: relative;
}
.nav-pills > li + li {
margin-left: 2px;
}
.nav-pills > li {
float: left;
}
.nav > li {
display: block;
position: relative;
}
* {
box-sizing: border-box;
}
答案 0 :(得分:1)
您需要在:before和:after伪元素上使用border-width值。 24px 0 24px 20px让它看起来接近正确的地方。
.nav-pills.nav-wizard > li:not(:first-child) a:before {
position: absolute;
content: "";
top: 0px;
left: -20px;
width: 0px;
height: 0px;
border-style: solid;
border-width: 24px 0 24px 20px;
border-color: #eee #eee #eee transparent;
z-index: 150;
}
.nav-pills.nav-wizard > li:not(:last-child) a:after {
position: absolute;
content: "";
top: 0px;
right: -20px;
width: 0px;
height: 0px;
border-style: solid;
border-width: 24px 0 24px 20px;
border-color: transparent transparent transparent #eee;
z-index: 150;
}