1

私は node.js と jade から始めています。Twitter ブートストラップで動作する Google アプリ エンジンでアプリを取得しました。

問題同じ html を jade に変換すると、モーダルが正常に動作せず、むしろ背景が重なってしまいます。フェード クラスを削除しましたが、役に立ちませんでした。これが翡翠のコードです

  #newWordModal.modal.hide
    .modal-header
      button.close(type='button', data-dismiss='modal') x
      h3 Add A Word
    .modal-body
      #create-word
        input#new-word-name(type='text', placeholder='Type in a word name')
        input#new-word-def(type='text', placeholder='Define it....')
    .modal-footer
      a.btn(href='#', data-dismiss='modal') Close
      a#add-word.btn.btn-primary(href='#', data-dismiss='modal') Add Word!

htmlの同じはこれです

<div class="modal hide fade" id="newWordModal">
  <div class="modal-header">
   <button type="button" class="close" data-dismiss="modal">×</button>
   <h3>Add A Word</h3>
  </div>
  <div class="modal-body">
    <div id="create-word">
    <input type="text" id="new-word-name" placeholder="Type in a word name" />
    <input type="text" id="new-word-def" placeholder="Define it...." />
  </div>
 </div>
 <div class="modal-footer">
   <a href="#" class="btn" data-dismiss="modal">Close</a>
   <a href="#" class="btn btn-primary" data-dismiss="modal" id="add-word">Add Word!</a>
 </div>
</div>

ここで何かを見逃しましたか?

4

1 に答える 1

0

here で説明されているように、コンテンツラッパーとして「modal.dialog」および「modal-content」クラスが欠落していると思います

コードは次のようになります

#playlistloadmodal.modal.fade
        .modal-dialog
            .modal-content
                .modal-header
                    button.close(type='button', data-dismiss='modal') x
                .modal-body
                    #create-word
                        input#new-word-name(type='text', placeholder='Type in a word name')
                        input#new-word-def(type='text', placeholder='Define it....')
                .modal-footer
                    a.btn(href='#', data-dismiss='modal') Close
                    a#add-word.btn.btn-primary(href='#', data-dismiss='modal') Add Word!
于 2014-09-07T20:32:42.450 に答える