* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: monospace;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: blue;
}

.circle {
    transform-style: preserve-3d;
    animation: animate 8s linear infinite;
}

@keyframes animate {
    0% {
        transform: perspective(1000px) rotateY(360deg) rotateX(15deg);
    }
    100% {
        transform: perspective(1000px) rotateY(0deg) rotateX(15deg);
    }
}

.circle .char {
    position: absolute;
    top: 0;
    left: 0;
    background: white;
    font-size: 6em;
    padding: 5px 12px;
    border-top: 6px solid red;
    color: green;
    border-bottom: 6px solid red;
    transform-style: preserve-3d;
    transform-origin: center;
    transform: rotateY(calc(var(--char-index) * 12deg)) translateZ(250px);
}