cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <div class="frame">
  <div class="cathead">
    <div class="upperface cf">
    <div class="lefteye left"></div><!--lefteye-->
    <div class="righteye right"></div><!--lefteye-->
    </div><!--upperface-->
  <div class="lowerface">
    <div class="leftcheek left"></div><!--leftcheek-->
    <div class="rightcheek left"></div><!--rightcheek-->
    <div class="mouth"></div><!--mouth-->
    </div><!--lowerface-->
</div><!--cathead-->
  
  <div class="bowl-container">
    <div class="bowl">
      <div class="water">
          <div class="fish">
        </div><!--fish-->
      </div><!--water-->
    </div><!--bowl-->
  </div><!--bowl-container-->
</div><!--frame-->
            
          
!
            
              * {
  box-sizing: border-box;
}

.cf:before,
.cf:after {
  content: " ";
  display: block;
}

.cf:after {
  clear: both;
}

.left {
  float: left;
}

.right {
  float: right;
}

.frame {
  border: 30px solid black;
  width: 400px;
  height: 450px;
  margin: auto;
  background: #064e66;
  overflow: hidden;
  position: relative;
}


/*-------------CAT--------------------*/

.cathead {
  position: relative;
  border: 1px solid black;
  border-radius: 50%;
  width: 200px;
  height: 200px;
  margin: 50px auto 0;
  background: #f1f1f1;
  z-index: 100;
  -webkit-animation:movinghead 20s linear infinite;
  -moz-animation:movinghead 20s linear infinite;
  animation:movinghead 20s linear infinite;
}

@-webkit-keyframes movinghead{
  0%{ -webkit-transform: rotate(-15deg);}
  250%{ -webkit-transform: rotate(0deg);}
  50%{ -webkit-transform: rotate(15deg);}
  75%{ -webkit-transform: rotate(-15deg);}
  100%{ -webkit-transform: rotate(-15deg);}
}

@-moz-keyframes movinghead{
  0%{ -moz-transform: rotate(-15deg);}
  250%{ -moz-transform: rotate(0deg);}
  50%{ -moz-transform: rotate(15deg);}
  75%{ -moz-transform: rotate(-15deg);}
  100%{ -moz-transform: rotate(-15deg);}
}

@keyframes movinghead{
  0%{ transform: rotate(-15deg);}
  250%{ transform: rotate(0deg);}
  50%{ transform: rotate(15deg);}
  75%{ transform: rotate(-15deg);}
  100%{ transform: rotate(-15deg);}
}

.cathead:before {
  content: '';
  position: absolute;
  left: -15px;
  top: -30px;
  width: 0;
  height: 0;
  border-left: 30px solid transparent;
  border-right: 50px solid transparent;
  border-bottom: 70px solid #f1f1f1;
  -webkit-transform: rotate(-33deg);
  -moz-transform: rotate(-33deg);
  -o-transform: rotate(-33deg);
  transform: rotate(-33deg);
}

.cathead:after {
  content: '';
  position: absolute;
  right: -15px;
  top: -30px;
  width: 0;
  height: 0;
  border-left: 50px solid transparent;
  border-right: 30px solid transparent;
  border-bottom: 70px solid #f1f1f1;
  -webkit-transform: rotate(33deg);
  -moz-transform: rotate(33deg);
  -o-transform: rotate(33deg);
  transform: rotate(33deg);
}

.lowerface {
  position: absolute;
  width: 100px;
  height: 100px;
  margin: auto;
  bottom: -20px;
  left: 0;
  right: 0;
  z-index: 3;
}

.leftcheek,
.rightcheek,
.mouth {
  border: 1px solid black;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  background: #f1f1f1;
  border-top-color: transparent;
}

.mouth {
  position: absolute;
  margin: auto;
  bottom: 35px;
  left: 0;
  right: 0;
  z-index: -1;
  background: #e5e5e5;
}

.rightcheek:before {
  position: absolute;
  left: 30px;
  content: '';
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 30px solid #f5989d;
  border-radius: 6px;
}

.upperface {
  width: 70%;
  margin: 60px auto;
  position: relative;
}

.lefteye,
.righteye {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #cddc39;
  position: relative;
}

.lefteye:before {
  content: '';
  position: absolute;
  border: 2px solid black;
  width: 130px;
  height: 200px;
  left: -80px;
  top: -12px;
  border-bottom-color: transparent;
  border-left: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  -webkit-transform: rotate(33deg);
  -moz-transform: rotate(33deg);
  -o-transform: rotate(33deg);
  transform: rotate(33deg);
}

.righteye:before {
  content: '';
  position: absolute;
  border: 2px solid black;
  width: 130px;
  height: 200px;
  left: -3px;
  top: -12px;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-right: transparent;
  border-radius: 50%;
  -webkit-transform: rotate(-33deg);
  -moz-transform: rotate(-33deg);
  -o-transform: rotate(-33deg);
  transform: rotate(-33deg);
}

.lefteye:after,
.righteye:after {
  content: '';
  border: 3px solid white;
  background: #657a4d;
  width: 10px;
  height: 30px;
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  margin: auto;
  border-radius: 100%;
  border-top: transparent;
  border-bottom: transparent;
  border-right: transparent;
  -webkit-animation:movingeyes 10s linear infinite;
  -moz-animation:movingeyes 10s linear infinite;
  animation:movingeyes 10s linear infinite;
}

@-webkit-keyframes movingeyes{
  0%{ left:-10px;}
  50%{left:20px;}
  100%{left:-11px;}
}

@-moz-keyframes movingeyes{
  0%{ left:-10px;}
  50%{left:20px;}
  100%{left:-11px;}
}

@keyframes movingeyes{
  0%{ left:-10px;}
  50%{left:20px;}
  100%{left:-11px;}
}


/*-------------FISHBOWL--------------------*/

.bowl-container {
  position: absolute;
  bottom: -10px;
  left: 20px;
  z-index: 50;
}

.bowl {
  border: 1px solid white;
  width: 300px;
  height: 200px;
  border-radius: 50%;
  border-top-color: transparent;
  background: rgba(255, 255, 255, 0.2);
}

.bowl:before {
  content: '';
  border: 5px solid white;
  width: 225px;
  height: 50px;
  position: absolute;
  border-radius: 50%;
  left: 34px;
  top: 10px;
}

.water {
  z-index: 10;
  width: 270px;
  height: 130px;
  border-radius: 50%;
  border-top-color: transparent;
  background: rgba(255, 255, 255, 0.3);
  position: absolute;
  bottom: 10px;
  left: 15px;
}

.water:before {
  content: '';
  background: rgba(255, 255, 255, 0.3);
  width: 220px;
  height: 65px;
  position: absolute;
  border-radius: 50%;
  left: 25px;
  top: 3px;
}

.fish {
  width: 50px;
  height: 20px;
  background-color: #f57f17;
  border-radius: 50%;
  position: absolute;
  left: 20px;
  top: 57px;
  z-index: -1;
  -webkit-animation:movingfish 10s ease-in-out infinite;
  -moz-animation:movingfish 10s ease-in-out infinite;
  animation:movingfish 10s ease-in-out infinite;
}

.fish:before {
  content: '';
  position: absolute;
  left: -5px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-left: 5px solid #f57f17;
  border-bottom: 10px solid transparent;
}

.fish:after{
  content:'';
  background:black;
  width:5px;
  height:5px;
  position:absolute;
  border-radius:50%;
  border:2px solid white;
  right:10px;
  top:3px;
}

@-webkit-keyframes movingfish{
  0%{ left:20px;
    -webkit-transform: scaleX(1);
  }
  49%{left:205px;
    -webkit-transform: scaleX(1);
  }
  50%{left:205px;
    -webkit-transform: scaleX(-1);
  }
  99%{left:20px;
    -webkit-transform: scaleX(-1);
  }
  100%{left:20px;
    -webkit-transform: scaleX(1);
  }
}

@-moz-keyframes movingfish{
  0%{ left:20px;
    -moz-transform: scaleX(1);
  }
  49%{left:205px;
    -moz-transform: scaleX(1);
  }
  50%{left:205px;
    -moz-transform: scaleX(-1);
  }
  99%{left:20px;
    -moz-transform: scaleX(-1);
  }
  100%{left:20px;
    -moz-transform: scaleX(1);
  }
}

@keyframes movingfish{
  0%{ left:20px;
    transform: scaleX(1);
  }
  49%{left:205px;
    transform: scaleX(1);
  }
  50%{left:205px;
    transform: scaleX(-1);
  }
  99%{left:20px;
    transform: scaleX(-1);
  }
  100%{left:20px;
    transform: scaleX(1);
  }
}

            
          
!
999px
Loading ..................

Console