Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 引导模式popover隐藏或关闭_Html_Css_Twitter Bootstrap_Bootstrap Modal - Fatal编程技术网

Html 引导模式popover隐藏或关闭

Html 引导模式popover隐藏或关闭,html,css,twitter-bootstrap,bootstrap-modal,Html,Css,Twitter Bootstrap,Bootstrap Modal,我的模态引导有问题。 我尝试创建一个模态,并在模态中创建一个模态popover。 结果是,它是打开的,而不仅仅是在我单击按钮时打开的 <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"> Launch demo modal </button> <!-- Modal --> <div class="modal f

我的模态引导有问题。 我尝试创建一个模态,并在模态中创建一个模态popover。 结果是,它是打开的,而不仅仅是在我单击按钮时打开的

<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
<div class="modal-body">
    <a href="#" role="button" class="btn btn-default popover-test" title="" data-content="And here's some amazing content. It's very engaging. right?" data-original-title="A Title" aria-describedby="popover64665">button</a>
    <div class="popover fade right in" role="tooltip" id="popover64665" style="top: 0px; left: 112px; display: block;">
        <div class="arrow" style="top: 50%;"></div>
        <h3 class="popover-title">A Title</h3>
        <div class="popover-content">And here's some amazing content. It's very engaging. right?</div>
    </div> 
</div>
</div>

启动演示模式
头衔
这里有一些令人惊奇的内容。这很吸引人。正确的?

我的1)你需要包括jQuery.jsbootstrap.js+bootstrap.css

2) 如果没有JS,它将无法工作,因此您需要设置例如script.JS

3) 在HTML中设置它

4) 在
script.js
中键入:

$('#myModal').on('shown.bs.modal', function () {
  $('#myInput').focus();
});
希望对……有所帮助。

查看我的答案