Skip to content

Instantly share code, notes, and snippets.

@kobitoDevelopment
Created June 7, 2022 01:06
Show Gist options
  • Select an option

  • Save kobitoDevelopment/5ab4a8c2842711a442d2e936e5757abb to your computer and use it in GitHub Desktop.

Select an option

Save kobitoDevelopment/5ab4a8c2842711a442d2e936e5757abb to your computer and use it in GitHub Desktop.
<div class="bg-blend">
<a href="#">クリック可能</a>
</div>
.bg-blend {
width: 100%; //希望のコンテンツ横幅
height: 100vh; //希望のコンテンツ縦幅
position: relative;
&:before {
content: "";
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
background-image: url(../images/noise.gif); //ブレンドさせたい背景
background-repeat: repeat;
opacity: 0.1; //透明度を調整
mix-blend-mode: hard-light; //ブレンドの種類を調整(検証ツールで調整)
z-index: 999; //どの要素まで被せたいかで調整
pointer-events: none; // ブレンドしている背景のクリックイベントを無視
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment