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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <!DOCTYPE html>
<!--inspired by learndesign spiΓ±ning numbers-->
<html lang ="en">
<head>
    <link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed&display=swap" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="styles.css">
<meta charset ="UTF-8">
</head>
<title>What are we ordering?</title>

</head>

<body>
<div class="main">
    <div id="box" class="box">
        <div class="box1">
        <span class="span1"><b>McDonalds Nuggets
            <br>🍟
        </b></span>
        <span class="span2"><b>Chinese Food
            <br>πŸ₯‘
        </b></span>
        <span class="span3"><b>Chipotle
            <br>🌯
        </b></span>
    <span class="span4"><b>The other Chinese food place</b></span>
    </div>
    <div class="box2">
        <span class="span1"><b>I give up, you pick.
            <br>πŸ€·β€β™€οΈ
        </b></span>
        <span class="span2"><b>Burgers!
            <br>πŸ”
        </b></span>
        <span class="span3"><b>Chik Fil A
            <br>πŸ”
        </b></span>
    <span class="span4"><b>Ughhhh
        <br>πŸ₯΄
    </b></span>
    </div>
</div>
</div>
<button class="spin" onclick="myfunction()">Spin!</button>

<script src="script.js">
</script>
</body>
</html>
              
            
!

CSS

              
                *{
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    outline: none;
}

body{
    font-family: 'Roboto Condensed', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    background: #e4f2f0;
    background-size: cover;
}
.main{
position: relative;
width: 500px;
height: 500px;
}

.main:after{
    position: absolute;
    content: '';
    width: 32px;
    height: 32px;
    background: url('http://nicoles.dev/images/arrow.png') no-repeat;
    background-size: 32px;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
}

.box{
width: 100%;
height: 100%;
position: relative;
border-radius: 50%;
border: 9px solid black;
overflow: hidden;
transition: all ease 3s;

}

span{
width: 50%;
height: 50%;
display: inline-block;
position: absolute;
}

.span1{
clip-path: polygon(0 92%, 100% 50%, 0 8%);
background-color: #618d87;
top: 120px;
left: 0;
}
.span2{
clip-path: polygon(100% 92%, 0 50%, 100% 8%);
background-color: rgb(90, 90, 90);
top: 120px;
right: 0;
}
.span3{
clip-path: polygon(50% 0%, 8% 100%, 92% 100%);
background-color: #70416d;
bottom: 0;
left: 120px;
}
.span4{
clip-path: polygon(50% 100%, 92% 0, 8% 0);
background-color: #170a19;
top: 0;
left: 120px;

}

.box2{
width: 100%;
height: 100%;
transform: rotate(-135deg);
}
span b{
    font-family: 'Roboto Condensed', sans-serif;
width: 65px;
height: 65px;
line-height: 20px;
color: rgb(228, 226, 226);
font-size: 18px;
text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

.spin{
    font-family: 'Roboto Condensed', sans-serif;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75px;
    height: 75px;
    border-radius: 50%;
    border: 2px solid black;
    background-color: rgb(46, 77, 77);
    color: #fff;
    box-shadow: 0 5px 10px #000;
    font-weight: bold;
    font-size: 22px;
    cursor: pointer;
}

.spin:active{
    width: 60px;
    height: 60px;
    font-size: 20px;
}

.main.animate:after{
    animation: animateArrow 0.7s ease infinite;

}
              
            
!

JS

              
                function myfunction(){
    var x = 1024;
    var y = 9999;
    
    var deg = Math.floor(Math.random() * (x - y)) + y;
    
    document.getElementById('box').style.transform = "rotate("+deg+"deg)";
    
    var element = document.getElementById('main');
    element.classList.remove('animate');
    setTimeout(function(){
        element.classList.add('animate');
    
    }, 3000);
    }
    
              
            
!
999px

Console