JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Relaxer App</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="wrapper">
<nav class="header">
<div class="header__row">
<h1 class="header__title">
Relaxer
</h1>
</div>
</nav>
<div class="content">
<div class="circle">
<div class="circle__row">
<div class="circle__border">
<div class="circle__block">Breathe In!</div>
<div class="circle__absolute"></div>
</div>
</div>
</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>
CSS
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
font-family: Arial, Helvetica, sans-serif;
background-color: #224941;
color: white;
}
.wrapper {
min-height: 100vh;
width: 100vw;
display: flex;
flex-direction: column;
}
.header__row {
display: flex;
justify-content: center;
align-items: center;
padding: 25px 0;
}
.header__title {
font-size: 30px;
}
.content {
flex: 1 1 auto;
margin: 30px 0 0 0;
display: flex;
justify-content: center;
align-items: center;
}
.circle__row {
flex: 1 1 auto;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
.circle__border {
border-right: 10px solid white;
border-radius: 50%;
border-bottom: 10px solid green;
border-left: 10px solid blue;
}
.circle__block {
width: 300px;
height: 300px;
display: flex;
justify-content: center;
align-items: center;
background-color: #010f1c;
border-radius: 50%;
font-size: 17px;
}
.circle__absolute {
width: 20px;
height: 20px;
background-color: #fff;
position: absolute;
border-radius: 50%;
animation: point 6s linear infinite;
top: calc(50% - 10px);
left: calc(50% - 10px);
}
@keyframes point {
0% {
transform: rotate(0deg) translateX(200px) rotate(0deg)
}
to {
transform: rotate(1turn) translateX(200px) rotate(-180deg)
}
}