如何修复 html 工具提示没有样式?

How to fix html tooltip taking in no styles?

使用 html 工具提示并将样式应用到工具提示 class,正在使用开发人员工具检查应用样式,但在页面中不可见。

我已经在 w3schools 中尝试了我的代码 运行,它可以正常工作。尝试在 DevTools 中更改值,它在我的本地仍然相同。

<h4>
I am 
<input type=number>
years old 
<span class= "tooltip">Some Text</span>, my annual income old <br> 
is 
<input type=number> 
and I have saved <br> 
<input type=number class= "numbers"> 
<span class="sub">(pre-tax or tax-exempt)</span>
and 
<input type=number> <span>(taxed).</span>
</h4>

应用的样式是:

.tooltip {
    position: relative !important;
    border: 2px solid black !important;
    height: 100px;
    background: red !important;
    width: 100px;
}

这就是我得到的。背景颜色和边框不可见,但它在源代码中。

问题已解决,将 class 工具提示更改为其他名称,因为我的样式已被环境中以前编写的样式覆盖。