Css 有twitter引导模式量表吗?

Css 有twitter引导模式量表吗?,css,twitter,modal-dialog,Css,Twitter,Modal Dialog,我使用的是twitter bootsrap中的“high”模式。是否可以用较低的分辨率进行缩放?如果我选择较低的分辨率,我看不到整个模式。我希望无论发生什么,它都能出现在屏幕上。如果它不适合,我希望它是可滚动的(实际上有时会发生/max height:400px)。我唯一能做的就是调整最大高度 .modal-body { max-height: 400px; padding: 15px; overflow-y: auto; } .modal { position: fixed

我使用的是twitter bootsrap中的“high”模式。是否可以用较低的分辨率进行缩放?如果我选择较低的分辨率,我看不到整个模式。我希望无论发生什么,它都能出现在屏幕上。如果它不适合,我希望它是可滚动的(实际上有时会发生/max height:400px)。我唯一能做的就是调整最大高度

.modal-body {
  max-height: 400px;
  padding: 15px;
  overflow-y: auto;
}


.modal {
  position: fixed;
  top: 30%;
  left: 50%;
  z-index: 1050;
  width: 750px;
  margin: -250px 0 0 -280px;
  overflow: auto;
  background-color: #ffffff;
  border: 1px solid #999;
  border: 1px solid rgba(0, 0, 0, 0.3);
  *border: 1px solid #999;
  -webkit-border-radius: 6px;
     -moz-border-radius: 6px;
          border-radius: 6px;
  -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
     -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
          box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
  -webkit-background-clip: padding-box;
     -moz-background-clip: padding-box;
          background-clip: padding-box;
}

虽然建议的解决方案有效,但当您使用位置:绝对时,如果窗口的滚动条低于该值(即顶部不可见),则模式会自动显示,然后滚动条会“跳”到其顶部

另一个选项是根据窗的高度调整模态的高度。为此,只需添加以下规则:

/* Since the position of the modal is top: 10%, this rules guarantees that its
centered vertically */
div.modal.fade.in { height: 80%; }

/* This rule shows the footer at the bottom of the modal and sets its width
so it looks good */
div.modal div.modal-footer{
    position: absolute;
    width: 94%;
    bottom: 0px;
}

/* Finally, we set the bottom of the body so its above the footer 
and its top so its bellow the header of the modal */
div.modal div.modal-body{
    position: absolute;
    width: 94%;
    top: 50px;
    bottom: 60px;
}

希望它有帮助

尽管建议的解决方案有效,但当您使用位置:绝对时,如果窗口的滚动条低于该值(即顶部看不见),则模式会自动显示,然后滚动条会“跳”到它的顶部

另一个选项是根据窗的高度调整模态的高度。为此,只需添加以下规则:

/* Since the position of the modal is top: 10%, this rules guarantees that its
centered vertically */
div.modal.fade.in { height: 80%; }

/* This rule shows the footer at the bottom of the modal and sets its width
so it looks good */
div.modal div.modal-footer{
    position: absolute;
    width: 94%;
    bottom: 0px;
}

/* Finally, we set the bottom of the body so its above the footer 
and its top so its bellow the header of the modal */
div.modal div.modal-body{
    position: absolute;
    width: 94%;
    top: 50px;
    bottom: 60px;
}

希望它有帮助

我希望背景像本视频中的最后一个ont一样可滚动我希望背景像本视频中的最后一个ont一样可滚动只有代码和没有解释的答案帮助不大。即使你只是解释代码的作用,它也会使它更清晰,如果你能说出为什么某些东西起作用,而不仅仅是什么起作用,它也会显示出你的知识。另一方面,这段代码是有效的,这不是一个复杂的问题。所以在这种情况下,没关系。只有代码而没有解释的答案就没那么有用了。即使你只是解释代码的作用,它也会使它更清晰,如果你能说出为什么某些东西起作用,而不仅仅是什么起作用,它也会显示出你的知识。另一方面,这段代码是有效的,这不是一个复杂的问题。所以在这种情况下,没关系。