Sunday 11 January 2015

Animating Typography In HTML Pages

Css Code:

body{
  background: #000;
  padding-top: 10px;
}

p{
  color: lime;
  font-family: "Courier";
  font-size: 20px;
  margin: 10px 0 0 10px;
  white-space: nowrap;
  overflow: hidden;
  width: 30em;
  animation: type 4s steps(60, end);
}

p:nth-child(2){
  animation: type2 8s steps(60, end);
}

p a{
  color: lime;
  text-decoration: none;
}

span{
  animation: blink 1s infinite;
}

@keyframes type{
  from { width: 0; }
}

@keyframes type2{
  0%{width: 0;}
  50%{width: 0;}
  100%{ width: 100; }
}

@keyframes blink{
  to{opacity: .0;}
}

::selection{
  background: black;
}

HTML:


Develop a simple html page with content in a <p></p>  Paragraph tag

No comments:

Post a Comment