html - Bootstrap 和 CSS - 修复药片的格式

标签 html css twitter-bootstrap

我有这些 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/

相关文章:

javascript - 多选,一一点击选项弹出新窗口

html - Div 不会扩展到 100% 宽度(在另一个 div 中彼此重叠)

javascript - 使图像淡入

html - 如何更改 Bootstrap 按钮组的事件颜色以使每个按钮具有不同的颜色

html - 如何为 div 添加外圆 Angular ?

html - 行内 block 元素插入其他行内 block 元素

css - 固定大小的 div 匹配宽度

html - 当用户调整窗口大小时,表格会缩小。页脚插入它的内容而不重叠它

html - CSS 动画无法识别嵌套跨度

jquery - 可折叠菜单对于移动横向来说太长