Skip to content

Instantly share code, notes, and snippets.

@naturallucky
Created May 12, 2019 03:59
Show Gist options
  • Save naturallucky/9657b9723d711897e34373507138d934 to your computer and use it in GitHub Desktop.
Save naturallucky/9657b9723d711897e34373507138d934 to your computer and use it in GitHub Desktop.
<style>
/* for bottom */
.fukidashi{
display: inline-block;
font-size:12pt;
padding: 5pt;
background: #fff;
border: 1px solid gray;
border-radius: 3%;
}
.fukidashi::before{
content: "";
position: absolute;
bottom: -30px;
left: 20px;
width: 0;
height: 0;
border-top: 30px solid gray;
border-left: 16px solid transparent;
transform-origin: left top;
transform: skewX(-40deg);
}
.fukidashi::after{
content: "";
position: absolute;
bottom: -26px;
left: 22px;
width: 0px;
height: 0px;
border-top: 30px solid white;
border-left: 16px solid transparent;
transform-origin: left top;
transform: skewX(-40deg);
}
/* for left */
.fukidashiL{
font-size:12pt;
padding: 5pt;
background: #fff;
border: 1px solid gray;
border-radius: 3%;
z-index:5;
}
.fukidashiL::before{
content: "";
position: absolute;
top: 2pt;
left: -40pt;
width: 0;
height: 0;
border-right: 40pt solid gray;
border-top: 18pt solid transparent;
transform-origin: left top;
transform: skewY(10deg);
}
.fukidashiL::after{
content: "";
position: absolute;
top: 3.5pt;
left: -39pt;
width: 0;
height: 0;
border-right: 40pt solid white;
border-top: 16pt solid transparent;
transform-origin: left top;
transform: skewY(10deg);
}
</style>
<div style="position:relative;width:100%;height:280pt;">
<div class="fukidashi" style="position: absolute; left:20pt;top:30pt;width:100pt;height:40pt;">
下に向かって
</div>
<div class="fukidashiL" style="position:absolute;left:200pt;top:30pt ;width:100pt;height:40pt;">
左に向かって
</div>
</div>
@naturallucky
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment