Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
  article, aside, figure, footer, header, hgroup, 
  menu, nav, section { display: block; }
  
  .container {
    width: 500px;
    margin: 100px auto;
  }
  
  .object {
    width: 300px;
    height: 140px;
    margin: 0 auto;
    -webkit-perspective: 700;
    -webkit-transform-style: preserve-3d;
    -moz-perspective: 700;
    -moz-transform-style: preserve-3d;
    -ms-perspective: 700;
    -ms-transform-style: preserve-3d;
    perspective: 700;
    transform-style: preserve-3d;
  }
  
  .ellipse {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      border: solid 1px white;
      -webkit-transition: -webkit-transform 1s linear;
      -moz-transition: -moz-transform 1s linear;
      -ms-transition: -ms-transform 1s linear;
      -o-transition: -o-transform 1s linear;
      transition: -webkit-transform 1s linear;
      text-align: center;
      font-size: 50px;
      line-height: 110px;
      border-radius: 50%;
      background: forestgreen;
  }
  
  .flipped {
      -webkit-transform: rotateY(180deg);
      -moz-transform: rotateY(180deg);
      -ms-transform: rotateY(180deg);
      -o-transform: rotateY(180deg);
      transform: rotateY(180deg);
  }
  
    p { margin: 0; line-height: 130px; 
  
        color: white;
        font-style: italic;
  }
    
    button {
      width: 80px;
      margin: 30px auto;
    display: block;
    }
</style>
</head>
<body>
  <div class="container">
 <div class="object">
   <div class="ellipse"><p>Front</p></div>
  </div>
  <button>Flip Me!</button>
  </div>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
  <script>
    $(function (){
      $('button').bind('click', function () {
        $('.ellipse').toggleClass('flipped');
      });
    });
  </script>
</body>
</html>
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers