Skip to content

Animation Checkbox


<div class='circle'>
  <div class='circle-mood'></div>
  <span class='line-short'></span>
  <span class='line-long'></span>


  width: 100px; height: 100px;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 100%; height: 100%;
  border: 15px solid red;
  box-sizing: border-box;
  border-radius: 50%;
  transition: .5s;
  cursor: pointer;
  border: 50px solid green;
.line-short, .line-long{
  position: absolute; height: 10px;
  background: white;
  transition: .5s; opacity: 0;
  width: 30px; top: 55px; left: 25px;
  transform: rotate(45deg);
  width: 50px; top: 44px; left: 40px;
  transform: rotate(-45deg);
.clicked ~ .line-long{ 
  opacity: 1
.clicked ~ .line-short{
  opacity: 1


$('.circle-mood').click(function () {

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: