在Bootstrap 4中垂直居中对齐

11 浏览
0 Comments

在Bootstrap 4中垂直居中对齐

我正在尝试使用Bootstrap 4将我的容器居中显示在页面中间,但至今未能成功。如果有任何帮助,将不胜感激。

我已经在Codepen.io上构建了一个示例,所以你们可以玩一下,并告诉我什么方法有效,因为我已经没有更多的想法了...

var currentAuthor = "";
var currentQuote  = "";
function randomQuote() {
  $.ajax({
      url: "https://api.forismatic.com/api/1.0/?",
      dataType: "jsonp",
      data: "method=getQuote&format=jsonp&lang=en&jsonp=?",
      success: function( response ) {
        $("#quote-content").html('