Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                %h1  CSS3 SINE WAVES    
%h2 [linear && alternate movement]
%section.curve.linear
  - (1..10).each do
    .increase
    .peak
    .decrease
    .valley
%h2 [wave perspective]
%section.curve.perspective
  - (1..15).each do
    .increase
    .peak
    .decrease
    .valley
%h2 [showing the wave]
%section.curve
  .showing
  - (1..10).each do
    .increase
    .peak
    .decrease
    .valley
%h2 [static]
%section.curve
  - (1..6).each do
    .increase
    .peak
    .decrease
    .valley
              
            
!

CSS

              
                // visual variables
$bodybg: #1E1717
$wavecolor: darken($bodybg, 7%)
$showingtime: 4s // 2s is fun, try :D
$titlecolor: #753222
  
// relevant variables
$angle: 38.43
$increasemargin: -89.75px
$thick: 5.7px
  
// relevant
div
  display: inline-block
 
.curve
  margin-bottom: 110px
 
.linear
  animation: linearmov 8s linear infinite alternate 
.perspective 
  transform: perspective(600px) rotateY(26deg)
.showing
  
.increase, .decrease
  height: $thick - 0.3px
  background: $wavecolor
  width: #{3.9*$angle}px
  margin-left: $increasemargin
  position: relative
  z-index: 1
.increase
  transform: rotate(-#{$angle}deg)
.decrease
  transform: rotate(#{$angle}deg)
  margin-left: $increasemargin + 1.5
  
.peak, .valley
  border: $thick solid $bodybg
  border-top: $thick solid $wavecolor
  border-radius: 50%
  width: 140px
  height: 105px
.peak 
  transform: translate(-44px, 47.65px)
.valley
  transform: rotate(180deg) translate(45px, -62px)

// page + movements + extra transforms
body
  background: $bodybg
  white-space: nowrap
  overflow-x: hidden
  font-family: 'Allerta'
  text-align: center
h1, h2
  color: $titlecolor
  margin-bottom: 0
h2
  font-weight: normal
  margin: 0
  
.showing
  float: right
  background: $bodybg
  width: 100%
  height: 200px
  animation: showing $showingtime linear infinite alternate
  position: relative
  z-index: 2
    
@keyframes linearmov
  from
    transform: translateX(0)
    perspective: 300px
  to
    transform: translateX(-1030px)

@keyframes showing
  from
    transform: translateX(0%)
  to
    transform: translateX(105%)
              
            
!

JS

              
                //  will be improved/organized soon.
// by diessica.com || github.com/diessicode
              
            
!
999px

Console