我正在寻找一种在单击 anchor 时显示 div 的方法。 我的页面上有一个 html5/php 表单,提交后会将用户带到放置在 div 中的 anchor ,并带有感谢消息,这是激活该链接的唯一方法。 这是我要显示的 div:
<div style="display:none">
<span id="thankyou"></span>
<p>Than you for your message. I will be in touch soon.</p>
</div>
有没有办法更改(可能使用 CSS) anchor 处于事件状态时的显示:无?
最佳答案
您可以尝试使用 javascript 隐藏和显示该元素。这是引用示例的链接 http://css-tricks.com/snippets/javascript/showhide-element/
你也可以使用 jQuery .hide() .show()
关于html - 如何在 anchor 处于事件状态时显示 div?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17518858/