引用
@幽理之刻 (3楼)
https://tieba.baidu.com/p/2848556678看看?
———————————————————————————
用了这个
@namespace url(
http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
/*在关闭按钮后插入一个小框,上面显示数字*/
tab .tab-close-button::after {
content : counter(counter) ;
font-style : normal !important ; /*字体风格,默认为标准(normal)*/
font-weight : bold !important ; /*字体粗细,默认为加粗(bold)*/
font-size : 10px!important ; /*字体大小,默认为10px*/
color : white ; /*字体颜色,默认为白色(white)*/
background : rgba(0,0,0,.75) ; /*小框的背景色*/
padding : 0 3px 0 3px ; /*内部边距,配合字体大小可以控制小框的大小*/
margin-left : -16px ; /*左外边距,默认为-16px*/
border-radius : 3px ; /*圆角*/
}
tab {
counter-increment:counter;
}
/*悬浮于关闭按钮时不显示数字*/
.tab-close-button:hover::after {
display : none !important ;
}
效果是这样


强迫症表示能不能让这个数字小框上去一点,位于中间?这样看着难受啊