最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【规避解决】html中用Bootstrap添加可点击关闭的标签

工作和技术 crifan 1181浏览 0评论
折腾:
【已解决】给绘本查询web版增加点击tag标签搜索
期间,需要给搜索框下面加一个可点击关闭的标签:
用于显示当前tag+难度
bootstrap closable tag
How to create a Label with close icon in Bootstrap? – Stack Overflow
Edit fiddle – JSFiddle
html – How to make a closing alert in Bootstrap – Stack Overflow
Close button not appearing for Bootstrap alert – Stack Overflow
Bootstrap alert and close button functionality without CSS – Stack Overflow
Close icon · Bootstrap
【总结】
最后没有实现可点击关闭的标签,只是用两个p,最后加上x:
<p class="badge-secondary current_search_para">标签:Farm and Ranch Animals + 难度等级:12 &times;</p>
css
.current_search_para{
    margin-left: 15px;
    /* margin-right: 39px; */
    margin-right: 0px;

    border-radius: 8px;
    font-size: 12px;
}
效果:

转载请注明:在路上 » 【规避解决】html中用Bootstrap添加可点击关闭的标签

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
80 queries in 0.169 seconds, using 22.15MB memory