<h3>Lv2:落石注意</h3>
<div class="route_sign hishigata" id="lv2">
<div class="sign_base"></div>
<div class="sign_content">
<div class="yama"></div>
<div class="stones">
<p></p>
<p>
<span></span>
<span></span>
<span></span>
</p>
<p>
<span></span>
<span></span>
<span></span>
</p>
<p></p>
</div>
</div>
</div>
:root{
--c-red:#ee0000;
--c-yellow:#ffc000;
--c-blue:#0168b7;
--c-black:#000000;
--c-white:#ffffff;
--sign-size:200px;
}
body{ padding:20px; }
div, p, div:before, div:after{ padding:0px; margin:0; box-sizing:border-box;}
/* 標識のベース設定 */
.route_sign{
width:var(--sign-size);
height:var(--sign-size);
position:relative;
overflow:hidden;
}
.sign_base,
.sign_content{
position:absolute;
width:100%; height:100%;
margin:0;
top:0; bottom:0;
left:0; right:0;
}
/* 丸い標識 */
.route_sign.radius,
.route_sign.radius .sign_base{
border-radius:var(--sign-size);
}
/* ひし形の標識 */
.route_sign.hishigata{
border-radius:0.25em;
transform:rotate(45deg);
/* 回転したことによってふちっこがはみ出てしまう */
margin-top:calc(var(--sign-size) / 4.5);
margin-bottom:calc(var(--sign-size) / 4.5);
margin-left:calc(var(--sign-size) / 4.5);
}
.route_sign.hishigata .sign_content{
transform:rotate(-45deg); /* 0°に戻す */
}
/* 落石注意 */
#lv2 .sign_base{
width:100%; height:100%;
background:var(--c-yellow);
}
#lv2 .sign_base:before,
#lv2 .sign_base:after{
content:"";
display:block;
position:absolute;
margin:auto;
top:0; bottom:0;
left:0; right:0;
}
#lv2 .sign_base:before{
width:95%; height:95%;
border:var(--c-black) solid 6px;
}
#lv2 .sign_base:after{
width:calc(95% - 8px); height:calc(95% - 8px);
background:var(--c-yellow);
border-radius:8px;
}
#lv2 .sign_content{
width:calc(var(--sign-size) * 0.7);
height:calc(var(--sign-size) * 0.7);
border-bottom:var(--c-black) solid 3px;
}
/* おやま */
#lv2 .sign_content .yama{
position:absolute;
top:43px;
border-bottom:var(--c-black) solid 95px;
border-left:transparent solid 55px;
border-right:transparent solid 45px;
}
#lv2 .sign_content .stones{
position:relative;
height:100%;
}
#lv2 .sign_content .stones p{
position:relative;
width:15px;
height:16px;
background:var(--c-black);
border-radius:20px;
}
#lv2 .sign_content .stones p:nth-child(1){
border:var(--c-yellow) solid 3px;
border-top-width:2px;
border-left-width:5px;
box-sizing:content-box;
top:47px; left:41%; transform:rotate(-42deg);
}
#lv2 .sign_content .stones p:nth-child(2){ top:52px; left:61%; transform:rotate(-30deg); }
#lv2 .sign_content .stones p:nth-child(3){ top:65px; left:69%; transform:rotate(-35deg); }
#lv2 .sign_content .stones p:nth-child(4){
top:71px; left:78%; transform:rotate(-90deg);
border-radius:0 20px 20px 0;
width:12px;
}
#lv2 .sign_content .stones p span{
transform: rotate(-100deg);
}
#lv2 .sign_content .stones p span{
display:block;
width:10px; height:2px;
background:var(--c-black);
position:relative;
}
#lv2 .sign_content .stones p span:nth-child(1){
top:-9px;
right:-4px;
}
#lv2 .sign_content .stones p span:nth-child(2){
top:-10px;
right:0px;
}
#lv2 .sign_content .stones p span:nth-child(3){
top:-11px;
right:4px;
}
#lv2 .sign_content .stones p:nth-child(3) span{
transform:rotate(100deg);
}
#lv2 .sign_content .stones p:nth-child(3) span:nth-child(1){
right:-10px;
top:-6px;
}
#lv2 .sign_content .stones p:nth-child(3) span:nth-child(2){
right:-6px;
top:-9px;
}
#lv2 .sign_content .stones p:nth-child(3) span:nth-child(3){
right:-2px;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.