Drupal 7:在加载所有内容之前放置一个加载屏幕

时间:2013-12-22 02:46:39

标签: drupal-7

我的Drupal网站需要一段时间才能加载,而在加载时,一切看起来都搞砸了。所以我选择了一个简单的解决方案,它使用这种解决方案的加载屏幕: Display a loading bar before the entire page is loaded
但我不知道如何在Drupal 7中实现它。 你能帮我一些线索吗? 谢谢!

1 个答案:

答案 0 :(得分:1)

.ajax-progress-throbber {
    z-index: 1500;
    border: 2px solid #C0C0C0;
    position: fixed;
    background: url('loader.gif') no-repeat center #ccc !important;
    opacity:0.6;
    padding:20px;
    border-radius:10px;
    -webkit-border-radius:10px;
    -moz-border-radius:10px;
    width:100%;
    min-width: 100%;
    height:100%;
    left:0;
    top:0;
  }

我这样做是通过将此代码放在我的css文件中并使用loader.gif图像,这是我的css文件所在的同一文件夹中的laso并使用该类。基本上我每次触发ajax时都会使用加载器图像。您可以根据不同的类别使用它。