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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

            
              <link href="https://fonts.googleapis.com/css?family=Raleway:200,100,400" rel="stylesheet" type="text/css" />


<div class="overlay">
  <div class='close-button '></div>
  <form id="form">
    <h1>Let us talk</h1>
    <label for="name">Name:</label><br>
    <input type="text" id="name" required /><br>
    <label for="email">Email:</label><br>
    <input type="email" name="" id="email" required /><br>
    <label for="msg">Message:</label><br>
    <textarea name="" id="msg" cols="20" rows="3" required></textarea><br>
   
    <button id="send" class="btn-send">Send</button>
  </form>  
</div>

<a href="#">
  <div class="circle">
    <div class="envelope-top"></div>
    <div class="envelope"></div>
  </div>
</a>
            
          
!
            
              /*-------------Basic-------------*/
body{
  font-family: 'Raleway', sans-serif;
  color:#fff;
  background:#105268;
  font-size:1.2rem;
}

h1{
  text-align:center;
}
*:focus {outline: none;}

/*-------------Form-------------*/
.overlay{  
  position: absolute;
  margin: auto;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  color:#105268;
  opacity:0;
  visibility: hidden;
  z-index:100;
  width: 0;
  max-width: 300px;
  height:0;
  max-height:350px;
  	background: #ecf0f1;
  padding:20px;
  border-radius:6px;
  box-shadow:.3em .3em .4em #000;
}
.overlay.open{
  width:100%;
  height:100%;
  visibility: visible;  
  transition:opacity .4s  .2s ease-out;
  opacity:1;
}
.close-button {
  display: inline-block;
  float:right;
  width: 2em;
  height: 2em;
  border: 0.1em solid tomato;
  font-size: .8em;
  border-radius: 50%;
  position: relative;
  transition: 0.5s;
  transform: translateZ(0);  
  transform: rotate(225deg);
}
.close-button:before {
  content: "";
  display: block;
  position: absolute;
  background-color: tomato;
  width: 80%;
  height: 6%;
  left: 10%;
  top: 47%;
}
.close-button:after {
  content: "";
  display: block;
  position: absolute;
  background-color: tomato;
  width: 6%;
  height: 80%;
  left: 47%;
  top: 10%;
}
.close-button:hover{
  cursor:pointer;
  background-color:tomato;
}
.close-button:hover:before, .close-button:hover:after{
  background-color:#fff;  
}
 /*-------------King Joffrey dies at his wedding-------------*/
input,textarea{
  border:2px solid #2c3e50;
  font-size:0.8em;
  background-color: #ecf0f1;
  color:#2c3e50;
  margin-bottom:8px;
  width:100%;
  max-width:100%;
}
input{
  width:65%;
}
input:focus,input:active,textarea:focus,textarea:active{
  background-color: #2c3e50;
  color:#ecf0f1;
}
input:invalid{
  border-color:#b31800;
}
.btn-send{
  color:tomato;
  background:#ecf0f1;
  border: 3px solid tomato;
  transition:all 0.3s;
  position:relative;
  float:right;
}
.btn-send:hover, .btn-send:active {
  color: #fff;
  background: tomato;
}
/*-------------Trigger Button-------------*/

.circle {
  position: absolute;
  margin: auto;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;  
  height: 200px;
  width: 200px;
  background: #FF7054;
  border: 4px solid #FF7054;
  border-radius: 50%;
  cursor: pointer;
  display: block;
  transition:border-radius .3s cubic-bezier(.3,-0.26,.4,1.3), height .3s cubic-bezier(.3,-0.26,.4,1.3),width .3s cubic-bezier(.3,-0.26,.4,1.3);
}
.circle:hover {
  background: #D93D21;
  border-color:#D93D21;
}
.circle.open{
  border-radius:0;
  height:100%;
  width:100%;
}
.circle.open:hover{
  background-color:#FF7054;
  border-color:#FF7054;
}
.envelope {
  height: 0;
  width: 0;
  border-bottom-right-radius: 8px;
  border-bottom-left-radius: 8px;
  border-bottom: 40px solid white;
  border-left: 60px solid white;
  border-right: 60px solid white;
  border-top: 40px solid transparent;
  margin: auto;
  top:0;
  bottom:0;
  left:0;
  right:0;
  position: absolute;
}
.envelope-top {
  height: 0;
  width: 0;
  border-left: 60px solid transparent;
  border-right: 60px solid transparent;
  border-top: 40px solid white;
  margin:auto;
  top:0;
  left:0;
  right:0;
  bottom:55px;
  position: absolute;
}
.circle:hover .envelope-top{
  transform:rotateX(180deg);
  top:-75px;
  transition:top 0.4s ease-in-out, transform 0.4s ease-in-out;  
}
            
          
!
            
              var $overlay=$('.overlay'),
    $trigger=$('.circle');

$trigger.click(function(){
  $overlay.addClass('open');
  $trigger.addClass('open');
})

$('.close-button').click(function(){
  $overlay.removeClass('open');
  $trigger.removeClass('open');
})

$('.btn-send').click(function(){
  if($(this).valid()){
    document.getElementById("client").reset();
    $overlay.removeClass('open');
    $trigger.removeClass('open');/*
    $('.wrap').addClass('fly');*/
  }
})
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console