我为输入的 URL 创建了一个 URL 预览框。
预览显示在 div 框中。我想在右上角添加一个关闭选项。怎么做才能在用户单击其框时禁用?
这是我的 小提琴。
<a class="fragment" href="google.com">
<div>
<img src ="http://placehold.it/116x116" alt="some description"/>
<h3>the title will go here</h3>
<h4> www.myurlwill.com </h4>
<p class="text">
this is a short description yada yada peanuts etc this is a short description yada yada peanuts etc this is a short description yada yada peanuts etc this is a short description yada yada peanuts etcthis is a short description yada yada peanuts etc
</p>
</div>
</a>
代码 在里面 php
原文由 user123 发布,翻译遵循 CC BY-SA 4.0 许可协议
一个简单的关闭按钮:
将此添加到您的
div
:你也可以使用这样的东西
造型
关闭按钮的 CSS
您可以添加悬停效果,例如