Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To make a website element flip or rotate, use CSS transforms; add JavaScript when you need to trigger or control playback. To show the result to someone else, capture it separately: a still screenshot shows one frame, while a recording shows the motion. Which capture method fits depends on whether you need a user-selected screen recording or an automated capture of a page.

Choose the effect before choosing how to capture it

A flip can mean a card turning to reveal its back, an element rotating in place, or an entire view transitioning to new content. These are related visual effects, but they call for different tools. A transform is usually the simplest way to animate one element. The Web Animations API adds script-controlled playback. The View Transition API is designed for transitions between views, and GSAP Flip can animate layout changes after an element moves or resizes.

Need Useful approach Playback or transition scope
Flip or rotate one element CSS transform and perspective CSS state, interaction, or a class toggled by JavaScript
Control animation playback from code Web Animations API Programmatic control of an animation object
Animate a view update or navigation View Transition API Old and new view states
Animate layout changes after DOM changes GSAP Flip Recorded element geometry before and after a change

Apple Developer Documentation’s archived Safari Visual Effects Programming Guide describes applying 2D or 3D transforms to HTML elements, including using div elements as the faces of a box or pages of a book. It is a useful conceptual reference, not current browser-compatibility guidance. Read the archived guide.

Make a reversible card flip with CSS

For a card that flips on click, create front and back faces inside a parent. Give the parent perspective, preserve the faces’ 3D positioning, and rotate the inner card when its flipped state changes. The faces should hide their back sides so text does not appear mirrored during the rotation.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
<button class="flip-card" type="button" aria-pressed="false">
  <span class="flip-card__inner">
    <span class="flip-card__face flip-card__front">Front</span>
    <span class="flip-card__face flip-card__back">Back</span>
  </span>
</button>

<style>
  .flip-card {
    width: 16rem;
    height: 10rem;
    padding: 0;
    border: 0;
    background: transparent;
    perspective: 900px;
    cursor: pointer;
  }
  .flip-card__inner {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 500ms ease;
  }
  .flip-card.is-flipped .flip-card__inner {
    transform: rotateY(180deg);
  }
  .flip-card__face {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    backface-visibility: hidden;
    border: 1px solid #888;
    border-radius: 0.75rem;
    background: white;
    color: #111;
    font: 700 1.5rem sans-serif;
  }
  .flip-card__back {
    transform: rotateY(180deg);
  }
  @media (prefers-reduced-motion: reduce) {
    .flip-card__inner { transition-duration: 0.01ms; }
  }
</style>

<script>
  const card = document.querySelector('.flip-card');
  card.addEventListener('click', () => {
    const flipped = card.classList.toggle('is-flipped');
    card.setAttribute('aria-pressed', String(flipped));
  });
</script>

The button makes the interaction keyboard-operable as well as clickable. The same state class can be toggled by another control or by application logic. For hover-only effects, CSS pseudoclasses can trigger the transform, but a hover state alone is not a good substitute for an accessible interaction on touch devices.

Adjusting the direction and feel

  • Use rotateY(180deg) for a side-to-side card flip, or rotateX(180deg) for a top-to-bottom flip.
  • Change the parent’s perspective to adjust the apparent depth. A smaller value makes the perspective stronger; it is a visual choice, not a browser recording setting.
  • Use a different duration or easing function in the transition to change the feel. Keep the reduced-motion rule so the animation does not impose unnecessary motion on users who request less of it.
  • For a simple spin, apply a rotation to the element itself. A two-sided card needs separate faces and back-face handling.

Use JavaScript when animation playback needs control

A CSS class is enough to start and reverse a transition by switching states. If code needs to pause, reverse, or change playback rate on an animation object, use the Web Animations API. MDN demonstrates constructing animations with transform keyframes and controlling playback rate in its Web Animations API guide.

const card = document.querySelector('.flip-card__inner');
const animation = card.animate(
  [
    { transform: 'rotateY(0deg)' },
    { transform: 'rotateY(180deg)' }
  ],
  { duration: 500, easing: 'ease', fill: 'forwards' }
);

// Script-controlled playback examples:
animation.pause();
animation.reverse();
animation.playbackRate = 0.75;
animation.play();

This example animates the inner element directly. If the same element also has CSS transitions or state classes controlling its transform, coordinate the two approaches: competing transform declarations can make the displayed result confusing. For an interface that must reliably toggle between front and back, keep an explicit application state and either update that state through CSS or create and manage animation objects from that state.

Use View Transitions for changing views, not for recording

The View Transition API captures the old and new view states around a change and animates between them. In a single-page application, document.startViewTransition() can wrap the DOM update callback. CSS can customize the animations of the old and new snapshots; the default effect is a cross-fade.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
function showNextView() {
  if (!document.startViewTransition) {
    renderNextView();
    return;
  }

  document.startViewTransition(() => {
    renderNextView();
  });
}

function renderNextView() {
  document.querySelector('main').innerHTML =
    '<h1>Next view</h1><p>Updated content</p>';
}

For cross-document transitions in a multi-page application, the documents opt in through CSS. MDN’s usage guide specifies that the cross-document case requires same-origin documents; do not assume it applies to navigation between unrelated origins. See MDN’s View Transition API usage guide and Chrome for Developers’ View Transition API documentation for the relevant patterns and current guidance.

A View Transition is an effect during a view update or navigation. It does not, by itself, create a downloadable video or animated image. If you need a recording, use a screen-capture workflow or a page-capture service separately.

Animate layout changes with FLIP when geometry changes

FLIP-style animation is useful when an element changes position, size, rotation, or skew as the layout or DOM changes. GSAP Flip records an element’s earlier geometry, lets the application make the change, and animates from the recorded state to the new one. It is a layout-transition option, not a prerequisite for a card that simply rotates. The GSAP Flip documentation describes its API.

Choose a capture method for the intended deliverable

Decide whether you need a still image, a user-mediated recording of the display, or an automated capture of a web page. The animation implementation and the capture mechanism are separate decisions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Capture route What it provides Important constraint
Still screenshot A single frame of the rendered page It cannot communicate how the effect moves over time
Browser Screen Capture API A media stream from a screen or portion of a screen selected by the user The browser asks for permission; transient user activation is required
Hosted animated page capture An automated recording of page interactions as an animated GIF, where documented by the service Check that service’s documented output format, duration, and interaction options

MDN’s Screen Capture API guide explains the user-selection and permission workflow for getDisplayMedia(). It is appropriate when a person is present to choose what to share; it is not a silent server-side page screenshot method.

Capture API documents a hosted animated screenshot endpoint that records page interactions as GIFs. Its documentation lists GIF as the format and 30 seconds as the maximum duration. Those are Capture’s documented limits, not universal browser limits; verify the vendor’s documentation for current availability and details at Capture’s documentation.

Or skip the browser setup

For an automated still capture, ScreenshotNeo takes a URL in one GET request and returns a screenshot or PDF. It is not an animated recording endpoint: use it to capture a frame, then use an animation or recording workflow if motion itself is the deliverable. The ScreenshotNeo website describes its screenshot API and MCP server; the API documentation lists request options.

curl -G "https://api.screenshotneo.com/v1/shot" 
  -d access_key=YOUR_API_KEY 
  --data-urlencode url=https://stripe.com 
  -o shot.webp

Replace the sample URL with the page you want to capture and provide your API key. For automated screenshots, this avoids setting up a browser session yourself. ScreenshotNeo accepts and removes cookie/consent banners, newsletter popups, and chat widgets before capture; those cleanup steps can each be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and responses indicate the page verdict and billing status in X-Page-Verdict and X-Billed headers. Its MCP server offers take_screenshot, get_page_info, and capture_pdf tools for AI agents and MCP clients.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for ScreenshotNeo’s free plan.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot the effect and the capture

The card flips, but the reverse text looks mirrored

Make sure each face has backface-visibility: hidden, the back face is rotated 180 degrees before the parent flips, and the front and back are positioned in the same area. Without that arrangement, the reverse face can show through or read backward.

The click does nothing

Check that the selector finds the intended card and that the event listener runs after the element exists. Verify that the handler toggles the same class targeted by the CSS rule. If another script replaces the card’s markup, attach the listener after rendering or use event delegation.

The animation runs, but the capture shows only one side

A still screenshot records one moment, not the complete motion. Trigger the flip before capturing and wait until the desired face is visible, or make a recording with a capture route that supports motion. For a user-selected screen capture, start the capture from a user action and complete the browser’s permission and source-selection prompts.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A View Transition is absent on some navigation

Check which type of transition you are using. An SPA transition wraps a DOM update; a cross-document transition requires the participating documents to opt in and, according to MDN’s usage guide, to be same-origin. Also check current browser compatibility information before relying on the API for a particular audience.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

An automated capture returns an unexpected page

Confirm that the URL is reachable and that the page has finished rendering the effect before capture. A still endpoint will not preserve animation as motion. If using a hosted animation-capture service, check its own documented interaction support and duration constraints rather than assuming screen-recording behavior.

Performance, accessibility, and reliability checks

  • Prefer transforms for simple flips and rotations rather than repeatedly changing layout properties. Keep effects limited to what the interaction needs.
  • Respect prefers-reduced-motion and ensure that the front/back content remains understandable without motion.
  • Do not make a hover-only interaction the sole way to reveal essential content. Provide a keyboard-accessible control and a clear state.
  • Test both the live interaction and the final deliverable. A still frame, an animated GIF, and a user-selected display recording preserve different amounts of information.
  • Browser support for animation and transition APIs changes. Consult current compatibility data for your target browsers rather than inferring support from an example or an archived guide.
  • For automated service captures, distinguish the status of a capture from whether it was billed. ScreenshotNeo exposes verdict and billing headers for that purpose; other services may document different response details.

For a single interactive card, CSS plus a small state change is usually the most direct implementation. Reach for script-controlled animation when playback controls matter, View Transitions when whole views change, and a separate capture workflow when the result must be shared as an image or recording.

Frequently Asked Questions

Can a CSS flip animation be captured as a still image?

Yes. A still capture shows whichever frame is rendered at capture time; it does not include the animation’s movement.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Does the View Transition API export a GIF or video?

No. It animates between captured view states in the page; use a separate capture or recording tool for a downloadable motion format.

Can cross-document View Transitions animate navigation across different websites?

MDN’s usage guide says the documented cross-document workflow requires same-origin documents, so it should not be treated as a general cross-origin transition.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.