[英]A weird css issue regarding the button hover, click and border?
下面是jsddle。 https://jsfiddle.net/xuhang1128/cmkbu07s/2/主要相關代碼如下。 我使用React和React-boostrap來實現它。
.design2-statusMonitor {
margin-top: 20px;
.list-group-item {
display: inline-block;
background-color: transparent;
// border: none;
border-right: 1px solid #CAD5E0;
border-top: 1px solid #CAD5E0;
border-bottom: 1px solid #CAD5E0;
width: auto;
&.selected {
background-color: #2f749a;
}
}
.list-group-item:after {
content: "";
width: 9px;
height: 9px;
position: absolute;
right: -6px;
top: 43%;
z-index: 2;
background-color: white;
border-top: 2px solid #CAD5E0;
border-right: 2px solid #CAD5E0;
transform: rotate(45deg);
-moz-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
}
.list-group-item.selected:after {
content: "";
width: 9px;
height: 9px;
position: absolute;
right: -6px;
top: 43%;
z-index: 2;
background-color: #2f749a;
border-top: 2px solid #CAD5E0;
border-right: 2px solid #CAD5E0;
transform: rotate(45deg);
-moz-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
}
.list-group-item:hover {
background-color: #c0d5e0;
color: white;
}
.list-group-item:hover:after {
background-color: #c0d5e0;
}
}
您可以看到,當我單擊任何氣泡按鈕時,三角形看起來不正常,如下所示。 當我將鼠標懸停在按鈕之外並單擊其他任何位置時,氣泡按鈕是否正常?
有人可以幫我修復它嗎? 非常感謝。 我已經研究了它,並用谷歌搜索了很多,沒有結果。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.