I have a span element and I gave it a background-color, is there is any way to control this particular background-size?
I tried background-size: auto 2px; (2px for example)
but it had no effects on it, what I want from the background color is to be a little bit smaller -height wise-, I want it to be from the top edge of the number to the bottom edge of it only, not bigger, is it possible?
button {
background-color: rgb(41, 184, 250);
border: 1px solid transparent;
border-radius: 1em;
transition: button 20ms ease;
}
span {
background-color: white;
background-size: auto 2px;
}
<button type="button">Unread Messages
<span>9</span>
</button>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…