html - 模糊背景图像缩小它,如何在不缩小的情况下模糊?

标签 html css filter background-image blur

without blur . with blur 我是 html、css 的初学者。我试图模糊我的每个 div 的背景图像,但它反而缩小了它。如何在不缩小的情况下进行模糊处理?

.parallax {
  /*height: 500px;*/
  height: 100vh;
  font-size: 200%;
  overflow-x: hidden;
  overflow-y: auto;
  perspective: 300px;
  perspective-origin-x: 100%;
}
.parallax .title {
  font-family: 'Lato', sans-serif;
  font-weight: bold;
  color: #424242 black;
  position: absolute;
  left: 50%;
  top: 50%;
  text-align: center;
  transform: translate(-50%, -50%);
}

/* below trying to blur */

.parallax .group2 .back {
  background: #ffdfba;
  background-image: url("image/bubble.png");
  background-size:contain;
  -webkit-filter: blur(5px);
  filter: blur(5px);
  height: 500px;
  height: 100vh;
}
  <div class="group group2">
          <div class="layer base">
              <div class="title">
                  Blowing Bubbles are fun! They help calm yourself and give you qualities to breath.
              </div>
          </div>
          <div class="layer back">
              <div class="title">

              </div>
          </div>
      </div>

最佳答案

.parallax .group2 .back 使用 background-size: cover。背景图像将覆盖整个 div 区域。 希望对你有帮助

关于html - 模糊背景图像缩小它,如何在不缩小的情况下模糊?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49354874/

相关文章:

PHP文件上传报错tmp_name为空

css - 使用 bootstrap 创建 10 列的网格

javascript - 使用 angularjs 观察下拉列表的选定值以填充数组取决于选定的值

django - 如何在 Django admin 中实现全局隐式过滤器?

javascript - 如何将多个过滤器组合在一起以使用 jQuery 过滤任务行?

java - 使struts 1.0文本框只读

php - 使用 PHP 从多选下拉列表中获取数据以插入 MySQL

html - 左侧重复的纹理和右侧重复的纹理

css - 不同颜色的下划线和字体

php - foreach 循环中不同的单个元素