我有一个按钮,:hover
我想在一个之后的元素上显示。但我看不到它。按钮上可以有:after
元素吗?
.button {
cursor: pointer;
height: 30px;
}
.button-primary {
border: none;
}
.button-primary:hover:after {
display: block;
position: relative;
top: 3px;
right: 3px;
width: 100px;
height: 5px;
}
<button class="button button-primary">My button</button>