如何使用CSS和Bootstrap建立模型

时间:2019-05-28 08:00:06

标签: css bootstrap-4

我在使用引导程序实现该模型时遇到问题

enter image description here

1 个答案:

答案 0 :(得分:-1)

请进一步描述您所面临的问题。 ==> Bootstrap模态易于使用。只需点击链接。 https://getbootstrap.com/docs/4.3/components/modal/

包括bootstrap css,js和jquery cdn,然后就可以了。

<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>