html - 如何修复没有样式的html工具提示?
问题描述
使用 html 工具提示并将样式应用于工具提示类,这些样式正在通过开发人员工具进行检查,但在页面中不可见。
我已经尝试在 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;
}
这就是我得到的。背景颜色和边框是不可见的,但它在源代码中。
解决方案
问题已解决,将类 Tootip 更改为其他名称,因为我的样式被环境中先前编写的样式覆盖。
推荐阅读
- spring-boot - Can't serialize access for this transaction when running single job, SERIALIZED isolation level
- java - 如何请求先前的参数(这里:场景)并根据结果采取行动?
- spring-boot - 未调用全局致命处理程序
- azure-ad-b2c - 在印度授权 B2C 的端点需要 2-3 秒
- delphi - 控制台应用程序输出在使用 >> 管道重定向启动另一个控制台应用程序时被打乱
- php - 将 PHPMailer 与 Slim 框架一起使用
- recursion - Clojure:在“IF”的两个条件下迭代循环
- xml - 如何使用 XPath 获取两个日期之间的秒数
- airflow - 如何管理具有不同开始日期的一百万个气流任务?
- api - 我无法在我的 cpanel 帐户上发布到 api