Bootstrap 3.0 Modal

后端 未结 4 1288
挽巷
挽巷 2020-12-29 05:10

I am stuck. Given Bootstrap 3.0 is about to be released, I decided to go with it for a new project. Things are going fine so far, but for the life of me, I can\'t figure out

相关标签:
4条回答
  • 2020-12-29 05:26

    You could try to build the docs: Compile Twitter bootstrap 3 docs (How to)? so also http://bassjobsen.weblogs.fm/explore-and-install-twitter-bootstrap-3/ from the docs:

      <!-- Button trigger modal -->
      <a data-toggle="modal" href="#myModal" class="btn btn-primary btn-lg">Launch demo modal</a>
    
      <!-- Modal -->
      <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
          <div class="modal-content">
            <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
              <h4 class="modal-title">Modal title</h4>
            </div>
            <div class="modal-body">
              ...
            </div>
            <div class="modal-footer">
              <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
              <button type="button" class="btn btn-primary">Save changes</button>
            </div>
          </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
      </div><!-- /.modal -->
    
    0 讨论(0)
  • 2020-12-29 05:34

    I've been fighting against the same problem and thanks to this conversation I found my mistake. While using TwitterBootstrap3, you need the following things:

    A button trigger

    <a data-toggle="modal"
       href="#myModal"
       class="btn btn-primary btn-lg"
    >Launch demo modal</a>
    

    An a div with this minimun structure:

    <div class="modal fade"
         id="myModal"
         tabindex="-1"
         role="dialog"
         aria-labelledby="myModalLabel"
         aria-hidden="true"
    >
        <div class="modal-dialog">
            <div class="modal-content">
                <!-- blah blah content here -->
           </div>
       </div>
    </div>
    

    It is important to know that if you don't place modal-dialog and model-content, the modal window will not be opened properly

    0 讨论(0)
  • 2020-12-29 05:41

    You can try simpleDialog. This is a simple bootstrap modal with callbacks and template injection options.

    0 讨论(0)
  • 2020-12-29 05:44

    I've found a very well example that as well let you download a zip with all the code examples about Booststrap 3 Modal.

    • Bootstrap 3 Modal explanation
    • Download Bootstrap 3 Modal demo

    I hope this help you as well!

    0 讨论(0)
提交回复
热议问题