Created
August 16, 2015 16:14
-
-
Save cazuki/1432f5252d3cdd76f3f0 to your computer and use it in GitHub Desktop.
WordPressでチャット風会話形式のコンテンツを表示するためのCSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.balloon-box { | |
overflow: hidden; | |
margin: 0 0 0.8rem; | |
} | |
.balloon-box:last-of-type { | |
margin: 0 0 1.7rem; | |
} | |
.balloon-icon { | |
width: 90px; | |
text-align: center; | |
line-height: 1rem; | |
} | |
.balloon-icon img { | |
width: 90px; | |
height: auto; | |
} | |
.balloon-icon span { | |
position: absolute; | |
top: 0; | |
font-size: 11px; | |
overflow: hidden; | |
white-space: nowrap; | |
} | |
.balloon-left .balloon-icon { | |
position: relative; | |
float: left; | |
margin:0 -90px 0 0; | |
} | |
.balloon-left .balloon-serif { | |
position: relative; | |
float: left; | |
margin: 0 90px 0 110px; | |
padding: 10px 0 0; | |
} | |
.balloon-left .balloon-serif:before, .balloon-left .balloon-serif::before { | |
position: absolute; | |
content: ""; | |
top: 20px; left: -10px; | |
width: 0; height: 0; | |
border-style: solid; | |
border-width: 10px 10px 0 0; | |
border-color: transparent #eeeeee transparent transparent; | |
z-index: 1; | |
} | |
.balloon-left .balloon-serif .balloon-content { | |
position: relative; | |
padding: 0.5rem 1rem; | |
line-height: 1.5rem; | |
background: #eeeeee; | |
border-radius: 6px; | |
z-index: 2; | |
} | |
.balloon-right .balloon-icon { | |
position: relative; | |
float: right; | |
margin: 0 0 0 -90px; | |
} | |
.balloon-right .balloon-serif { | |
position: relative; | |
float: right; | |
margin: 0 110px 0 90px; | |
padding: 10px 0 0; | |
} | |
.balloon-right .balloon-serif:before, .balloon-right .balloon-serif::before { | |
position: absolute; | |
content: ""; | |
top: 20px; right: -10px; | |
width: 0; height: 0; | |
border-style: solid; | |
border-width: 10px 0 0 10px; | |
border-color: transparent transparent transparent #eeeeee; | |
z-index: 1; | |
} | |
.balloon-right .balloon-serif .balloon-content { | |
position: relative; | |
padding: 0.5rem 1rem; | |
line-height: 1.5rem; | |
background: #eeeeee; | |
border-radius:6px; | |
z-index:2; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment