如何使CSS(或JS?)隐藏帮助栏

发布于 2024-09-12 23:04:44 字数 79 浏览 2 评论 0原文

当您有新的答案或评论时,该网站如何在顶部显示一个栏,我想显示一个非常相似的栏,其中只有一行文本和一个用于关闭它的 [X]。我该如何开始这样做呢?

Sort of how this website shows a bar on top when you have new answers or comments, I want to show a very similar bar that just has a line of text in it and an [X] to close it. How would I begin to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不打扰别人 2024-09-19 23:04:44

您可以简单地将 div 保留在您想要的位置,并使用 CSS 隐藏它。每当您需要显示某些内容时,请在其中设置文本并设置 CSS 以显示相同的内容。单击 [X] 后,可以重置 CSS。

You can simply keep a div with the position of your wish and use CSS for hiding the same. Whenever you need to show something, set the text inside and set the CSS to show the same. Upon clicking the [X], the CSS can be reset.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文