利用box-shadow做引导页中遮罩层

687 阅读1分钟

利用box-shadow做引导页中遮罩层 引导页遮罩层效果.png html:

<div class="leading"><div class="leading-mask"></div><div class="leading-content"><p>可以设置公开给其他玩家哦</p></div></div>

css:

/*leading*/
.leading {
  position: fixed;
  bottom: 0;
  left: 0;
  top: 0;
  right: 0;
  z-index: 9999;
  border-radius: 50%;
}

.leading-mask {
  position: absolute;
  bottom: calc(0.16rem + env(safe-area-inset-bottom));
  left: 0.18rem;
  width: 1.8rem;
  height: 1.8rem;
  -webkit-box-shadow: 0 0 0 2000px rgba(28, 28, 28, 0.76);
  box-shadow: 0 0 0 2000px rgba(28, 28, 28, 0.76);
  border-radius: 50%;
}

.leading-content {
  position: absolute;
  bottom: calc( 2.16rem + env(safe-area-inset-bottom));
  left: 1.02rem;
  color: #fff;
  overflow: hidden;
  font-size: 0.54rem;
}

.leading-content::after {
  margin: 0.24rem 0 0 0.8rem;
  display: block;
  content: "";
  width: 0.66rem;
  height: 0.96rem;
  background: url(../../../../img/bgames/cardgroup/icon-lead-cardgroup.png) no-repeat;
  background-size: 100% 100%;
}