CSSで吹き出し作成
CSS吹き出し作成ジェネレーターを使用しました。
https://generator.web-alpha.info/fukidashi/index.php#step1
出力されたCSS
CSSが自動で出力されます。
.arrow_box{
position:relative;
width:300px;
height:140px;
background:#FFFFFF;
padding:20px;
text-align:left;
border:2px solid #FF7C5C;
color:#333333;
font-size:14px;
border-radius:15px;
-webkit-border-radius:15px;
-moz-border-radius:15px;
}
.arrow_box:after,.arrow_box:before{
border: solid transparent;
content:'';
height:0;
width:0;
pointer-events:none;
position:absolute;
right:100%;
top:50%;
}
.arrow_box:after{
border-color: rgba(255, 255, 255, 0);
border-top-width:10px;
border-bottom-width:10px;
border-left-width:30px;
border-right-width:30px;
margin-top: -10px;
border-right-color:#FFFFFF;
}
.arrow_box:before{
border-color: rgba(255, 124, 92, 0);
border-top-width:12px;
border-bottom-width:12px;
border-left-width:36px;
border-right-width:36px;
margin-top: -12px;
margin-right: 2px;
border-right-color:#FF7C5C;
}
SCSS記法
SCSS記法で書くとこんな感じでしょうか?
.arrow_box{
position:relative;
width:300px;
height:140px;
background:#FFFFFF;
padding:20px;
text-align:left;
border:2px solid #FF7C5C;
color:#333333;
font-size:14px;
border-radius:15px;
-webkit-border-radius:15px;
-moz-border-radius:15px;
&::after, &::before {
border: solid transparent;
content:'';
height:0;
width:0;
pointer-events:none;
position:absolute;
right:100%;
top:50%;
}
&::after {
border-color: rgba(255, 255, 255, 0);
border-top-width:10px;
border-bottom-width:10px;
border-left-width:30px;
border-right-width:30px;
margin-top: -10px;
border-right-color:#FFFFFF;
}
&::before {
border-color: rgba(255, 124, 92, 0);
border-top-width:12px;
border-bottom-width:12px;
border-left-width:36px;
border-right-width:36px;
margin-top: -12px;
margin-right: 2px;
border-right-color:#FF7C5C;
}
}