A Pen by antonio-ventura

Forked from Tim's Pen jaoLv.

<!DOCTYPE html>
<html >
<head>
  <meta charset="UTF-8">
  <title>A Pen by  antonio-ventura</title>
  <script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script>


  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">

  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>
   <section>
  <div tabindex="1">
    <span>tab 1</span>
    <p>I'm hidden content for tab 1!</p>
  </div>
  <div tabindex="1">
    <span>tab 2</span>
    <p>I'm hidden content for tab 2!</p>
  </div>
  <div tabindex="1">
    <span>tab 3</span>
    <p>I'm hidden content for tab 3!</p>
  </div>
</section>
  <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>

    <script  src="js/index.js"></script>

</body>
</html>
/* Downloaded from https://www.codeseek.co/ */
section {
  position: relative;
  width: 608px;
  margin: 0 auto;
}
section:after {
  content: 'Click on a tab above!';
  position: absolute;
  left: 0;
  top: 35px;
  width: 100%;
  text-align: center;
  background-color: #E9F0C8;
  padding: 40px 0;
}

div {
  width: 200px;
  display: inline-block;
  background-color: purple;
  color: white;
  text-align: center;
  -webkit-transition: .25s ease;
  transition: .25s ease;
}
div span {
  cursor: pointer;
  display: block;
  width: 100%;
}
div:focus {
  outline: none;
  background-color: orange;
}
div:focus p {
  display: block;
  position: absolute;
  background-color: gray;
  height: 100px;
  width: 100%;
  left: 0;
  z-index: 2;
}

p {
  display: none;
}

body {
  padding: 3em;
}
/* Downloaded from https://www.codeseek.co/ */
//nope

This awesome code ( A Pen by antonio-ventura ) is write by antonio-ventura, you can se more from this user in the personal repository

You can find the original code on Codepen.io

2018 © antonio-ventura