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="beamtoix-story" id=story>
  <div class="beamtoix-scene" id=scene1>
    <div class=house id=house1>
      <img class=photo src="https://www.devtoix.com/assets/beamtoix/demos/e-commerce-example/apartment-1851201_1920-a.jpg" />
      <div class=house-desc>Beautiful apartment with river view.
        <div class=under></div>
        <div class=under></div>
      </div>
    </div>
    <div class=house>
      <img class=photo src="https://www.devtoix.com/assets/beamtoix/demos/e-commerce-example/home-3429674_1920-a.jpg" />
      <div class=house-desc>Live free surrounded by trees.
        <div class=under></div>
        <div class=under></div>
      </div>
    </div>
    <div id=post-desc>
      <div>Live free</div>
      <ul>
        <li>Near the forest</li>
        <li>No traffic</li>
        <li>Spacious</li>
      </ul>
    </div>
    <img id=mouse src="https://www.devtoix.com/assets/beamtoix/demos/e-commerce-example/mouse-1345874_1920-a.png" />
    <img id=photo-big src="https://www.devtoix.com/assets/beamtoix/demos/e-commerce-example/home-3429674_1920-b.jpg" />
    <div id=dog>
      <img src="https://www.devtoix.com/assets/beamtoix/demos/e-commerce-example/animal-1284307_1920.png" />
    </div>
    <div id=want>I want to live here!!</div>
    <div id=desc>E-COMMERCE</div>
  </div>
</div>

              
            
!

CSS

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

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

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

.house {
  background-color: #d2d2d2;
  min-width: ($beamtoix-width - 20) + px;
  display: flex;
  padding: 10px;
  box-sizing: border-box;
  margin-bottom: 6px;
}

#house1 {
  max-height: 90px;
  overflow: hidden;
}

.photo {
  border: 1px solid #7f7c7c;
  margin-right: 10px;
  display: inline-block;
}

.house-desc {}

.under {
  background-color: #bbb;
  min-width: 314px;
  min-height: 16px;
  margin-top: 5px;
}

#photo-big {
  position: absolute;
  bottom: 17px;
  left: 20px;
  width: 100px;
  height: auto;
  border: 1px solid #7f7c7c;
}

#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;
}

#mouse {
  position: absolute;
  top: 0;
  left: 0;
}

#post-desc {
  position: absolute;
  top: 19px;
  left: 278px;
  padding: 7px 39px 57px 10px;
  overflow: hidden;
  background-color: #d2d2d2;
  transform: rotateX(90deg);
  transform-origin: top;
  color: #555;
}

#dog {
  position: absolute;
  top: 135px;
  left: 18px;
  overflow: hidden;
  max-height: 48px;
  img {
    position: relative;
    left: 0;
    top: 48px;
  }
}

#want {
  position: absolute;
  display: none;
  top: 151px;
  left: 71px;
  background: #dededef7;
  color: #5f5f5f;
  padding: 3px;
  border: 1px solid #8c8383;
  border-radius: 5px;
}

              
            
!

JS

              
                /*
  website: https://www.devtoix.com/en/projects/beamtoix
  linkedin: https://www.linkedin.com/in/abentofreire/
  X: https://x.com/devtoix
  github: https://github.com/a-bentofreire/beamtoix
  
  If you like this project, please, give it a star on github.
  
  Read here on how to generate an animated gif or mp4 file from this animation:
  https://www.devtoix.com/en/projects/beamtoix#get-started
*/

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

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

  const scene1 = story.scenes[0];
  scene1
    .addAnimations([{
      selector: '#mouse',
      duration: '1s',
      props: [{
        prop: 'left-top',
        valueStart: 0,
        path: {
          handler: BeamToIX.PathName.line,
          params: {
            x0: 275,
            y0: 59,
            x1: 65,
            y1: 163,
          } as BeamToIX.LinePathParams,
        },
      }],
    }])
    .addAnimations([{
      selector: '#mouse',
      props: [{
        prop: 'visible',
        value: 0,
      }],
    }, {
      selector: '#desc',
      // position: '2s',
      duration: '2s',
      props: [{
        prop: 'transform',
        valueFormat: 'rotateY(%fdeg)',
        valueStart: 90,
        value: 0,
      }],
    }, {
      selector: '.house',
      duration: '0.2s',
      props: [{
        prop: 'margin-top',
        valueStart: '0px',
        value: -120,
      }],
    }, {
      selector: '#photo-big',
      duration: '0.2s',
      advance: true,
      easing: BeamToIX.EasingName.easeInCubic,
      props: [{
        prop: 'width',
        value: 243,
      }],
    }, {
      selector: '#post-desc',
      duration: '0.2s',
      props: [{
        prop: 'transform',
        valueStart: 90,
        valueFormat: 'rotateX(%fdeg)',
        value: 0,
      }],
    }, {
      selector: '#dog img',
      duration: '0.4s',
      advance: true,
      props: [{
        prop: 'top',
        easing: BeamToIX.EasingName.easeInBounce,
        value: 5,
      }],
    }, {
      selector: '#want',
      props: [{
        prop: 'visible',
        value: 1,
      }],
    }])
    .addStills('0.4s');

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

              
            
!
999px

Console