元素之后我有一些漂亮的CSS:停止:跳转到下一行上包裹
$itemHeight: 40px;
$arrowModifier: 8;
$pageBackgroundColor: $color-gray-50;
.processBar {
display: flex;
flex-wrap: wrap;
&_item {
display: inline-block;
background: $color-gray-200;
height: $itemHeight;
position: relative;
flex-grow: 1;
text-align: center;
line-height: $itemHeight;
text-decoration: none;
color: $color-text;
padding-left: 10px;
padding-right: 10px;
&:hover {
text-decoration: none;
color: $color-text;
}
&-default {
&:hover {
background: $color-light-gray;
}
}
&-selected {
background: $color-white;
}
&:before,
&:after {
display: inline-block;
content: "";
border-style: solid;
position: absolute;
}
&:first-child {
&:before {
left:0;
border: none;
}
}
&:not(:first-child) {
&:before {
left:0;
border-color: transparent transparent transparent $pageBackgroundColor;
border-width: $itemHeight/2 0 $itemHeight/2 $itemHeight/$arrowModifier;
}
}
&:last-child {
&:after {
right: 0;
border: none;
}
}
&:not(:last-child) {
&:after {
right:0;
border-color: $pageBackgroundColor transparent;
border-width: $itemHeight/2 0 $itemHeight/2 $itemHeight/$arrowModifier;
}
}
}
}
下面是使用它的HTML:
<div class="processBar">
<a href="javascript:" class="processBar_item">Label</a>
<a href="javascript:" class="processBar_item">Label</a>
<a href="javascript:" class="processBar_item">Label</a>
<a href="javascript:" class="processBar_item">Label</a>
<a href="javascript:" class="processBar_item">Label</a>
<a href="javascript:" class="processBar_item">Label</a>
</div>
这里是做什么的:
但是在一定的尺寸:after
元素可以Ĵ UMP下来,在这里看到:
我不明白这是为什么发生。我怎样才能阻止它发生?