1. 程式人生 > >可消失的彈出框

可消失的彈出框

ref 實現 dismiss att -c con 屬性 devel span

通過使用 focus 觸發器可以在用戶點擊彈出框是讓其消失。

實現“點擊並讓彈出框消失”的效果需要一些額外的代碼

為了更好的跨瀏覽器和跨平臺效果,你必須使用 <a> 標簽,不能使用 <button> 標簽,並且,還必須包含 tabindex 屬性。

<a tabindex="0" class="btn btn-lg btn-danger" role="button" data-toggle="popover" data-trigger="focus" title="Dismissible popover" data-content="And here‘s some amazing content. It‘s very engaging. Right?">可消失的彈出框</a>

可消失的彈出框