Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Animate Headline" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <h1>Portfolio</h1>
  <hr>
  <p>
    Ein Einblick in unser Schaffen zu den Themen:<br/>
    Corporate Design, Fotografie, Illustration …
  </p>
</body>
</html>
 
 
h1
{
  font-family: arial, san-serif;
  text-align: center;
  font-size: 4em;
  margin: 0;
}
p
{
  font-family: arial, san-serif;
  text-align: center;
}
.linie {
position:absolute;   
z-index: -1;        
}  
.linie div {
position:absolute;  
left: 0px; top: 0px;  
border-left-color: transparent;  
border-style: solid;  
}
 
$(function(){
  var linie = $('hr'),
      text = $('h1 , hr + p'),
      elm = $('h1, hr, hr + p');
      
  //Animation vorbereiten
  text.css({opacity: 0});
  linie.css({width: '0%'});
  linie.animate({
    width: "90%"
  }, 1500, function() { 
    text.animate({opacity: 1}, 1500,function(){
      elm.animate({opacity: 0}, 1500);
    });
  });
});
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
janpro
0viewers