CSS FLIP CARD GENERATOR
Build a two-sided flip card, tune direction and trigger, and copy the CSS.
In short
Build a two-sided card that flips to reveal its back, with horizontal or vertical rotation, a hover or click trigger, and adjustable speed and perspective — then copy the CSS and HTML. No JavaScript, runs entirely in your browser.
Front side
Back side
Hover the card to flip it
Direction
Trigger
Front
Back
.flip-card {
position: relative;
width: 260px;
height: 170px;
perspective: 1000px;
}
.flip-card-toggle {
display: none;
}
.flip-card-inner {
position: relative;
width: 100%;
height: 100%;
transition: transform 600ms;
transform-style: preserve-3d;
cursor: pointer;
}
.flip-card:hover .flip-card-inner {
transform: rotateY(180deg);
}
.flip-card-front,
.flip-card-back {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
backface-visibility: hidden;
border-radius: 12px;
font-weight: 600;
}
.flip-card-front {
background: #ff6a35;
}
.flip-card-back {
background: #2f6fed;
transform: rotateY(180deg);
}How to use the flip card
- 1
Choose a flip direction: horizontal (rotateY) or vertical (rotateX).
- 2
Choose a trigger: hover, or click using a hidden checkbox toggle.
- 3
Tune duration and perspective depth with the sliders.
- 4
Pick a front and back color.
- 5
Copy the CSS and HTML and drop in your own front/back content.
Questions
- What does backface-visibility: hidden actually do here?
- Both the front and back faces are stacked in the same spot and share the 3D rotation. Without backface-visibility: hidden, the back face would still render (mirrored) through the front while unflipped, since browsers show the 'back' of a rotated element by default.
- How does the click trigger work without JavaScript?
- It uses the checkbox hack: a hidden <input type="checkbox"> sits as a sibling of .flip-card-inner inside a <label>, and the CSS rule .flip-card-toggle:checked ~ .flip-card-inner applies the flip transform whenever the (invisible) checkbox is checked — clicking the label toggles it.
- Why does the back face need its own 180deg rotation?
- The back face is positioned exactly on top of the front face (via position: absolute; inset: 0) and pre-rotated 180deg so that once the whole .flip-card-inner rotates 180deg on flip, the back face lands at 360deg — right-side up and facing the viewer.
- Can I flip the card automatically, without hover or click?
- Yes — drop the :hover/:checked selector and instead apply an animation with a rotate keyframe to .flip-card-inner, or add the :checked rule's transform directly to a class you toggle with a few lines of JavaScript on a timer.
- Does this tool store or upload anything?
- No — every setting is applied and rendered locally in your browser. Nothing is sent to a server.
Related tools
- CSS 3D Tilt Card GeneratorBuild a card that tilts in 3D on hover with perspective and rotateX/rotateY, tune the angle and glare, and copy the CSS.
- CSS Holographic Foil Card GeneratorBuild a holographic trading-card foil effect with a rainbow, gold or silver sheen and cursor-following glare, then copy the CSS, HTML and script.
- 3D Extruded Text GeneratorGive flat text a solid, extruded look with a stack of offset text-shadow layers — adjust depth, angle, and color.
- CSS Card GeneratorDesign a UI card — corner radius, padding, shadow intensity, colors, hover lift — and copy the CSS and HTML.
- CSS Image Hover Overlay GeneratorBrowse zoom, dim-with-caption, slide-up caption, and icon-reveal hover overlays for images, and copy the CSS.
- CSS Gooey Effect GeneratorMake shapes melt into each other like liquid with an SVG goo filter: merging blobs, a gooey menu or a dripping button, then copy the CSS and HTML.
- CSS Cubic-Bezier Easing Curve EditorDrag the control points of a cubic-bezier() easing curve, preview the motion live, and copy the finished value.
- CSS View Transitions GeneratorBuild View Transitions animations (crossfade, slide, cover, zoom, blur, wipe, circle reveal) with a live preview, and copy the CSS, HTML and startViewTransition script.
Updated