※デベロッパーツール等でソースコードをご確認ください(Please check using Developer tools)
DummyText
.octagon {
position: relative;
width: 300px;
height: 300px;
margin: 50px auto;
}
.octagon-text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
color: #fff;
font-size: 20px;
z-index: 1;
}
.octagon-list {
height: 300px;
animation: rotation 20s infinite linear;
}
.octagon-list li {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
width: 41.421356237%;
height: 100%;
margin: auto;
background: #19243a;
}
.octagon-list li:nth-of-type(1) {
transform: rotate(0deg);
}
.octagon-list li:nth-of-type(2) {
transform: rotate(45deg);
}
.octagon-list li:nth-of-type(3) {
transform: rotate(90deg);
}
.octagon-list li:nth-of-type(4) {
transform: rotate(135deg);
}
@keyframes rotation {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}