Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <header>
  <h1>vtcha implementation</h1>
  Smart & userfriendly captcha.
</header>
<form method="post">
  <input 
    name="name"
    placeholder="Name"
    required
  >
  <input 
    type="email"
    name="email" 
    placeholder="Email"
    required
  >
  <input
    type="url"
    name="url" 
    placeholder="Website"
  >
  <p class="hide-this-pls">U cannot use this form whitout JavaScript!</p>
  <input
    class="show-me-the-cool-things"
    name="mail"
    placeholder="Your email here"
  ><!-- named it mail for the spambots intresst -->
  <input type="submit" value="Submit">
</form>
<footer>
  &copy; 2015 <a href="//elementcode.de" target="_blank">Wolf Wortmann</a> | <a href="//github.com/wolf-w/pastebox/tree/master/vtcha" target="_blank">vtcha</a> implementation
</footer>
              
            
!

CSS

              
                /* CHANGE color settings of vtcha */
.vtcha{
  margin-bottom: 20px;
  max-width: 100%;
  text-align: center;
}
.vtcha .item-box,
.vtcha .target-box{
  width: 170px;
  margin: 10px auto 0;
}
.vtcha .item{
  background-color: rgb(0,55,63);
  color: rgb(13,168,142);
}
.vtcha .target{
  color: rgb(0,55,63) !important;
  background-color: rgb(13,168,142);
}
.vtcha .target-box.complete .target{
  background-color: rgb(170,170,170);
  color: rgb(140,140,140) !important;
}
.vtcha .target-box.complete .target.complete{
  color: rgb(0,55,63) !important;
}

/* FORM styles */

/* Inspired by https://codepen.io/heyjules/pen/ogvKRK */
*{
  margin: 0;
  padding: 0;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
body {
    font-family: 'Titillium Web', sans-serif !important;
    background-color: rgba(0, 55, 63, 1);
  color: rgb(0,0,0);
}
header{
  padding: 70px;
  text-align: center;
  color: rgb(150,150,150);
}
h1{
  text-transform: uppercase;
  font-size: 50px;
  font-weight: 100;
  color: rgb(255,255,255);
}
form{
  background-color: rgb(255,255,255);
  padding: 40px;
  max-width: 400px;
  margin: auto;
}
input{
  display: block;
  border: none;
  background: none;
  padding: 10px;
  border-bottom: 1px solid rgb(200,200,200);
  width: 100%;
  font-size: 1rem;
  margin-bottom: 25px;
  -webkit-transition: all .4s;
  transition: all .4s;
}
::-webkit-input-placeholder{
  font-weight: bold;
  opacity: 1;
  font-size: 1rem;
}
:-ms-input-placeholder{
  font-weight: bold;
  opacity: 1;
  font-size: 1rem;
}
::-moz-placeholder{
  font-weight: bold;
  opacity: 1;
  font-size: 1rem;
}
form p{
  padding: 0 10px;
}
input[type="submit"]{
  background-color: rgb(43,182,115);
  border: none;
  color: rgb(255,255,255);
  font-weight: bold;
  font-size: 1.3rem;
  padding: 15px;
  margin: 0;
  cursor: pointer;
}
input[type="submit"]:hover{
  background-color: rgb(23,162,95);
}
input[hidden]{
  display: none;
}

footer{
  padding: 70px;
  text-align: center;
  text-transform: uppercase;
  color: rgb(255,255,255);
  font-size: .8em;
}
footer a{
  text-decoration: none;
  color: rgb(40,179,112);
  transition: all .4s;
}
footer a:hover{
  color: rgb(255,255,255);
}
              
            
!

JS

              
                $(document).ready(function(){
  //call vtcha like a boss
  $('.show-me-the-cool-things').vtcha({
    hide: '.hide-this-pls',
    ok: 'vtcha_has_human_detected',
  })
  
  $('form').submit(function(event){
    if($('.show-me-the-cool-things').val() == 'vtcha_has_human_detected'){
      swal('Youre pretty Human (:','Verified as Human.','success');
    }
    else{
      swal('Are u a f@$% spambot?!','Try the captcha again!','error');
      event.preventDefault();
    }
    //u can comment the following line out to see the post data
    event.preventDefault();
  })
})
              
            
!
999px

Console