JSFiddle - React, Tailwind, and code Playground

by HDL52

HTML

<div class="circle-container">
  <div class="circle">
    <div class="logo">
    </div>
    <div class="text">
      <p>
        Hover Me Hover Me Hover Me Hover Me Hover Me
      </p>
    </div>
  </div>
</div>

CSS

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.circle-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.circle {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
}

.logo {
  position: absolute;
  width: 150px;
  height: 150px;
  background-image: url("https://raw.githubusercontent.com/Hongda-OSU/PicGo-2.3.1/master/imgdog.svg");
  background-color: white;
  transform: rotate(15deg);
  background-size: cover;
  border-radius: 50%;
  filter: brightness(1.5) contrast(1.5);
}

.text {
  position: absolute;
  width: 100%;
  height: 100%;
  animation: rotateText 10s linear infinite;
}

.text p {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: consolas;
}

.text span {
  position: absolute;
  left: 50%;
  font-size: 1.2em;
  transform-origin: 0 100px;
}

@keyframes rotateText {
  0% {
    transform: rotate(360deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

JavaScript

const text = document.querySelector(".text p")
text.innerHTML = text.innerText
  .split("")
  .map(
    (char, i) => `<span style="transform:rotate(${i * 8}deg)">${char}</span>`,
  )
  .join("")