要防止此边界外泄漏,您需要使用声明background-clip属性padding-box.这将解决您的问题.
守则变更:
#tf span h6 {
background: #333333;
border: 4px solid #F9F9F9;
border-radius: 99px;
color: white;
font: 700 30px/80px arial, sans-serif;
margin-left: -26px;
padding: 5px 13px;
/* The important part to remove the overflow/leak: */
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
}
Run Code Online (Sandbox Code Playgroud)
希望这可以帮助.