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

              
                <div class="abeamer-story" id=story>
  <div class="abeamer-scene" id=scene1>
    <img id=malaysia src="https://abeamer.devtoix.com/files/by-date/2018/06/ad-example/kuala-lumpur-1820944_640.jpg" />
    <img id=thailand src="https://abeamer.devtoix.com/files/by-date/2018/06/ad-example/phang-nga-bay-2076834_640.jpg" />
    <div id=discover>Discover</br>Thailand<br/><span id=only>ONLY</span> 499</div>
    <div id=explore>Explore</br>Malaysia<br/>ONLY 599</div>
    <div id=desc>Advertisement</div>
  </div>
</div>
              
            
!

CSS

              
                $abeamer-width: 480;
$abeamer-height: 200;

body,
html,
.abeamer-story,
.abeamer-scene {
  width: $abeamer-width + px;
  height: $abeamer-height + px;
}

#scene1 {
  font-size: 15px;
  font-family: sans-serif;
  background-color: #e0e0e0;
}

#thailand,
#malaysia {
  position: absolute;
  left: 0;
  top: 0;
}

#discover, #explore {
  font-family: 'Amatic SC', cursive;
  position: absolute;
  top: 35px;
  right: 6px;
  font-size: 44px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0px 0px 2px #b3b3b3;
  opacity: 0;
}

#desc {
  position: absolute;
  top: 5px;
  right: 0;
  padding: 3px;
  transform: rotateY(90deg);
  transform-origin: right;
  background: #ff000087;
  color: #fff;
  border-radius: 2px 0px 0px 2px;
  font-size: 14px;
}
              
            
!

JS

              
                // twitter: https://x.com/devtoix
// website: https://abeamer.devtoix.com
// github: https://github.com/a-bentofreire/abeamer

/* ---------------
* To generate a png file sequence, gif or .mp4 file of your work:
* 1. Install ABeamer, read the instructions: https://abeamer.devtoix.com/#get-started
* 2. Create a project using abeamer: abeamer create foo
* 3. Copy the:
*     - scss code to css/main.scss   (compile it)
*     - ts code to js/main.ts or if it's javascript to js/main.js
*     - html code inside the story to code inside the story in index.html
*     - the dimensions code at the top of scss code to abeamer.ini
* 4. To generate a file sequence: abeamer render foo
* 5. To generate an animated gif file (after step 4): abeamer gif foo
* 6. To generate a .mp4 file (after step 4): abeamer movie foo
* ---------------- */

$(window).on("load", () => {

  const story: ABeamer.Story = ABeamer.createStory(/*FPS:*/25);

  const scene1 = story.scenes[0];
  scene1
    .addAnimations([{
      selector: '#discover',
      advance: true,
      duration: '1s',
      props: [{
        prop: 'opacity',
      }, {
        prop: 'right',
        duration: '0.5s',
        position: '2s',
        value: 500,
      }],
    }, {
      selector: '#thailand',
      advance: true,
      props: [ {
        prop: 'left',
        duration: '0.5s',
        position: '2s',
        value: -500,
      }],
    },
    {
      selector: '#explore',
      props: [ {
        prop: 'opacity',
        duration: '1s',
      }],
    }])
    .addAnimations([{
      selector: '#desc',
      position: '2s',
      duration: '2s',
      props: [{
        prop: 'transform',
        valueFormat: 'rotateY(%fdeg)',
        valueStart: 90,
        value: 0,
      }],
    }])
    .addStills('0.4s');

  story.render(story.bestPlaySpeed());
});

              
            
!
999px

Console