【问题标题】:CSS - background gradient not covering whole page as it growsCSS - 背景渐变不会随着页面的增长而覆盖整个页面
【发布时间】:2015-01-16 03:43:40
【问题描述】:

我有一个带有手风琴的页面,当手风琴打开时背景没有填满整个页面。

以下是我目前尝试过的。

.models-background {
  /* IE10 Consumer Preview */ 
  background-image: -ms-linear-gradient(top, #666666 0%, #E6E6E6 100%);

  /* Mozilla Firefox */ 
  background-image: -moz-linear-gradient(top, #666666 0%, #E6E6E6 100%);

  /* Opera */ 
  background-image: -o-linear-gradient(top, #666666 0%, #E6E6E6 100%);

  /* Webkit (Safari/Chrome 10) */ 
  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #666666), color-stop(1, #E6E6E6));

  /* Webkit (Chrome 11+) */ 
  background-image: -webkit-linear-gradient(top, #666666 0%, #E6E6E6 100%);

  /* W3C Markup, IE10 Release Preview */ 
  background-image: linear-gradient(to bottom, #666666 0%, #E6E6E6 100%);

  background-size: 100% 100%;

  background-repeat: no-repeat;

  background-size: cover;
}

【问题讨论】:

标签: css


【解决方案1】:
add at the beginning of the CSS code:

{

min-height: 100% ;
min-width: 100% ;

<!-- add your stuff :) -->
}

如果你想参考其他帖子:

previous question 1: 缩放渐变 Previous question 2: 缩放背景

希望对你有帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-09-26
    • 2018-01-27
    • 2016-09-28
    • 1970-01-01
    • 1970-01-01
    • 2022-07-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多