将不透明的白框放在滤镜上

时间:2019-11-27 11:07:19

标签: html css

我想将白盒放在透明滤镜上。

通过此来源,overlay div也是透明的。

我不想太过透明。

我也想将whitebo居中。

有什么好主意吗?

#filter {
  position: fixed;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  background: #000;
  filter: alpha(opacity=80);
  -moz-opacity: 0.80;
  opacity: 0.80;
  z-index: 100;
}

* html #filter {
  /* ie用 */
  position: absolute;
  height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight: document.body.offsetHeight + 'px');
}

#overlay {
  display: block;
  position: relative;
  background: white;
  top: 150px;
  width: 400px;
  height: 400px;
  text-align: center;
  color: #fff;
  z-index: 102;
}
<div id="filter">
  <div id="overlay">

  </div>
</div>

0 个答案:

没有答案
相关问题