Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用样式属性隐藏 div 标签
<div style='visibility:hidden'>Sample</div>
但是,该物业适用于 Firefox,但不适用于 safari。有人可以提出替代方案。提前致谢。
一种不同的方法可能是:
<span style="opacity: 0">Sample</span>
您可以使用 display: none;
代码如下所示:
<div style='display:none;'>Sample</div>