snippet

Zoom in on a point by

Slideshow/Presentation tool that uses 2D/3D CSS3 transformations (using scale and translate) and rsSlideIt.js


Tags: zoom in on point

The MIT License (MIT)

Copyright (c) 2017

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
In this demo, you have 3 slides contained inside the #viewport (red border element).
The first slide has no transformation, the second one is rotated 30 degrees and the third one is scaled 2 times.
a
transform: none;
Slide 2
transform: rotate(30deg);
Slide 3
transform: scale(2);
  1. Drag with your mouse.
  2. Use your mouse wheel to zoom in/out.
  3. Double-click on a slide.
  4. More on GitHub
    ol { display: inline-block; } #viewport { display: inline-block; border: 2px red solid; width: 400px; height: 200px; white-space: nowrap; } #viewport span { background-color: yellow; display: inline-block; } #viewport span + span { transform: rotate(30deg); } #viewport span + span + span { transform: scale(2); } #controlpane { vertical-align: top; line-height: 1.5em; } a.github { display: block; margin-top: 2em; }var $viewport = $("#viewport"); $viewport.rsSlideIt({ slideSelector: 'span' }); $("#controlpane li:first-child button").click(function () { $viewport.rsSlideIt('transition', { slide: 'prev' }); }); $("#controlpane li:first-child + li button").click(function () { $viewport.rsSlideIt('transition', { slide: 'next' }); });