我有这些 Bootstrap pills 我正试图开始工作,我的示例链接如下:
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;
}
最佳答案
您需要在 :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;
}
关于html - Bootstrap 和 CSS - 修复药片的格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40250231/