<a href="#0" alt="open/close button" class="open-close-btn">x</a>
body {
  font-family: verdana;
  font-weight: 200;
}

.open-close-btn {
  display: block;
  margin: auto;
  width: 30px; height: 30px;
  vertical-align: middle;
  line-height: 23px;
  color: #333;
  text-decoration: none;
  font-size: 28px;
  border: 3px solid transparent;
  text-align: center;
  -webkit-transition: all 0.3s ease-out;
  transition: all 0.3s ease-out;
  border-radius: 50%;
  
    &:hover {
    color: red;
    border: 3px solid grey;
    transform: scale(0.8) rotateZ(90deg);
  }
}
View Compiled
Run Pen

External CSS

  1. https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.2.3/animate.min.css

External JavaScript

This Pen doesn't use any external JavaScript resources.