css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

  <link href="https://fonts.googleapis.com/css?family=Sancreek" rel="stylesheet">
<!--<div class = "fortune" id = "fortuneResult"></div>-->

  <div class = "circle">
    <div class = "text">
      Magic <span class = "eight">&nbsp8 </span> ball
    <div class = "question">
      state your question
      <p><input type = "form-control" id = "inputQ"></input><button class = "btn btn-primary" id = "getAnswer">Get Answer</button></p>

<div class = "fortuneCircle">
      <div class="yourAnswer">Your answer awaits</div>
  <div class = "triFor">
        <div class = "fortune" id = "fortuneResult"></div>
        <div id = "triangle-up">
<div class = "endStatement">Written and Coded by <a href = "https://jwolfgang.info" target = "_blank">Jim C-M</a> 2018 </div>
              body {
  background-color: black;
  font-family: Sancreek;


.circle {
  width: 700px;
  height: 700px;
  border-radius: 50%;
  border: 10px solid white;
  margin: 100px auto 50px auto;
  color: white;
  text-align: center;
  /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#666666+1,1c1c1c+74,131313+100 */
background: rgb(102,102,102); /* Old browsers */
background: -moz-radial-gradient(center, ellipse cover,  rgba(102,102,102,1) 1%, rgba(28,28,28,1) 74%, rgba(19,19,19,1) 100%); /* FF3.6-15 */
background: -webkit-radial-gradient(center, ellipse cover,  rgba(102,102,102,1) 1%,rgba(28,28,28,1) 74%,rgba(19,19,19,1) 100%); /* Chrome10-25,Safari5.1-6 */
background: radial-gradient(ellipse at center,  rgba(102,102,102,1) 1%,rgba(28,28,28,1) 74%,rgba(19,19,19,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#666666', endColorstr='#131313',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
.fortuneCircle {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 5px solid white;
  margin: 0 auto;
  cursor: pointer;
  transition: background 1s, transform 1s;
  position: relative;

  transform: rotate(2160deg);


.tryFor {
  cursor: pointer;
  transition: background 1s, transform 1s;

.tryFor:hover {
 transform: rotate(360deg);
.text {
  padding-top: 50px;
  font-size: 60px;

.eight {
  font-size: 2em;
  color: purple;

#getAnswer {
  margin-bottom: 15px;
  margin-left: 30px;

.centerer {
  text-align: center;

.question {
  font-size: 1.5em;

#inputQ {
  background-color: black;
  color: white;

#triangle-up { 
  margin: 30px auto;
  width: 0; 
  height: 0; 
  border-left: 100px solid transparent; 
  border-right: 100px solid transparent; 
  border-bottom: 150px solid blue; 
  text-align: left;

  margin-top: 30px;

#fortuneResult {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 70%;

.endStatement {
              $( document ).ready(function() {
  //Reports to console that the page is ready
    console.log( "ready!" );
  var input = document.getElementById("inputQ");

// Execute a function when the user releases a key on the keyboard
input.addEventListener("keyup", function(event) {
  // Cancel the default action, if needed
  // Number 13 is the "Enter" key on the keyboard
  if (event.keyCode === 13) {
    // Trigger the button element with a click

    var input = $('#inputQ').val();
    let randomNumber = Math.floor(Math.random()*8);
    let eightBall = '';
     switch (randomNumber) {
  case 0:
    eightBall = 'It is certain';
  case 1:
    eightBall = 'It is decidely so';
  case 2:
    eightBall = 'I can\'t tell';
  case 3:
    eightBall = 'Que seran seran';
  case 4:
    eightBall = 'Don\'t count on it';
  case 5:
    eightBall = 'Yes indeed';
  case 6:
    eightBall = 'Not lookin\' like it';
  case 7:
    eightBall = 'Oh hell yeah!';
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................