Home  >  Article  >  Web Front-end  >  How to close the popup layer in bootstrap

How to close the popup layer in bootstrap

藏色散人
藏色散人Original
2019-07-16 11:29:162862browse

How to close the pop-up layer in bootstrap

How to close the popup layer in bootstrap

How to close the pop-up layer in bootstrap

By default, The pop-up box will close after clicking the specified element again. You can use the data-trigger="focus" attribute to close the pop-up box when the mouse clicks outside the element:

<a href="#" title="取消弹出框" data-toggle="popover" data-trigger="focus" data-content="点击文档的其他地方关闭我">
点我</a>

How to close the popup layer in bootstrap

If you want to achieve the effect of displaying the element when the mouse moves it and disappearing after removal, you can use the data-trigger attribute and set the value to "hover":

<a href="#" title="Header" data-toggle="popover" data-trigger="hover" data-content="一些内容">
鼠标移动到我这</a>

How to close the popup layer in bootstrap

Related recommendations: "bootstrap tutorial"

The above is the detailed content of How to close the popup layer in bootstrap. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn