Skip to content

Instantly share code, notes, and snippets.

@kobitoDevelopment
Last active July 10, 2022 04:35
Show Gist options
  • Select an option

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

Select an option

Save kobitoDevelopment/5f2725667076bf7486748ad611d36b57 to your computer and use it in GitHub Desktop.
<div class="reflect">
<!-- テキストでも画像でも可 -->
<p class="reflect-item reflect-target">反射</p>
<p class="reflect-item reflect-content">反射</p>
</div>
.reflect {
position: relative;
.reflect-item {
font-size: 4rem;
line-height: 1;
&.reflect-content {
position: absolute;
bottom: -100%;
left: 0;
transform-origin: center;
transform: rotateY(180deg) rotateZ(180deg);
&:after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: linear-gradient(0deg, transparent 0 30%, #fff 100%);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment