CSS backface-visibility Property

Beginner
⏱️ 6 min read
📚 Updated: Jun 2026
🎯 4 Examples
3D & Transforms

What You’ll Learn

The backface-visibility property controls whether the reverse side of an element is visible during 3D rotations. It is essential for clean flip-card animations and polished 3D transform effects.

01

3D Faces

Front and back of a box.

02

Syntax

visible or hidden.

03

Flip Cards

Hide mirrored reverse sides.

04

visible Default

Back face can appear.

05

preserve-3d

Works with 3D transforms.

06

Animations

Cleaner rotateX and rotateY.

Definition and Usage

The backface-visibility CSS property defines whether the back face of an element should be visible when the element is turned away from the viewer in 3D space.

When you rotate an element with rotateY(180deg) or rotateX(180deg), the browser can render both the front and back sides of that element. For flip cards, setting backface-visibility: hidden; prevents the reverse side from showing through during the animation.

💡
Beginner Tip

Most flip-card tutorials use hidden on both faces so only one side appears at a time while the card rotates.

📝 Syntax

Set backface-visibility with one of two keyword values:

syntax.css
selector {
  backface-visibility: visible | hidden;
}

Basic Example

backface-visibility.css
.card-front,
.card-back {
  backface-visibility: hidden;
}

Syntax Rules

  • The property accepts only the keywords visible and hidden.
  • The initial value is visible.
  • It is most useful with 3D transforms such as rotateX() and rotateY().
  • Flip-card setups usually combine it with transform-style: preserve-3d and perspective.
  • The back face is pre-rotated, often with transform: rotateY(180deg); on the back side.

⚡ Quick Reference

QuestionAnswer
Initial valuevisible
Applies toElements with 3D transforms
InheritedNo
AnimatableNo
Common useFlip cards, 3D rotations, and transform animations

Default Value

The initial value of backface-visibility is visible. That means the back face of an element can appear when it is rotated in 3D space unless you explicitly hide it.

💎 Property Values

backface-visibility has only two keyword values.

ValueExampleMeaning
visiblebackface-visibility: visible;The back face is rendered when the element faces away from the viewer
hiddenbackface-visibility: hidden;The back face is not visible during rotation
hidden

The preferred choice for flip cards. Only the front-facing side appears during rotation.

Front
Back

Clean flip effect with no mirrored reverse side.

visible

The default behavior. The reverse side can show through during rotation.

Front
Back

Can look messy in flip-card animations.

Common 3D Setup for Flip Cards

backface-visibility is usually part of a small 3D transform pattern:

  • perspective on the parent — adds depth to the rotation.
  • transform-style: preserve-3d on the inner wrapper — keeps child faces in 3D space.
  • Absolute front and back faces — two layers stacked in the same box.
  • backface-visibility: hidden on both faces — hides the reverse side during the flip.
  • Back face rotation — usually transform: rotateY(180deg); on the back content.

visible vs hidden

ValueWhat you see during rotationBest for
hiddenOnly the intended front-facing sideFlip cards, menus, and polished 3D UI
visibleThe reverse side may appear or look mirroredDefault browser behavior and special visual effects

👀 Live Preview

Hover this card to see a flip animation using backface-visibility: hidden;:

Front
Back

Both faces use hidden, so the reverse side does not show through mid-flip.

Examples Gallery

Try backface-visibility with hover flip cards, visible vs hidden comparisons, styled cards, and vertical flips.

📚 Flip Card Basics

Use backface-visibility: hidden to keep front and back faces from appearing at the same time.

Example 1 — Hover Flip Card

Create a card that rotates on hover and reveals a back face cleanly.

flip-card.html
<style>
  .card { perspective: 1000px; }
  .card-inner {
    transform-style: preserve-3d;
    transition: transform 0.6s;
  }
  .card:hover .card-inner { transform: rotateY(180deg); }
  .card-front,
  .card-back { backface-visibility: hidden; }
  .card-back { transform: rotateY(180deg); }
</style>
Try It Yourself

How It Works

Each face hides its reverse side, so the card reveals only one face at a time while rotating.

Example 2 — visible vs hidden

Compare the default visible behavior with the cleaner hidden flip effect.

compare-backface.css
.clean-flip { backface-visibility: hidden; }
.default-flip { backface-visibility: visible; }
Try It Yourself

How It Works

hidden prevents the reverse side from appearing during rotation, while visible allows it.

🎨 Styled and Vertical Flips

Apply the same idea to richer card designs and different rotation axes.

Example 3 — Styled Flip Card

Add real front and back content while keeping the animation smooth with hidden backfaces.

styled-flip.css
.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}
Try It Yourself

How It Works

Both faces occupy the same space, but only the front-facing one is visible at any moment during the flip.

Example 4 — Vertical Flip with rotateX

Use the same backface technique with a top-to-bottom rotation instead of left-to-right.

vertical-flip.css
.tile:hover .tile-inner {
  transform: rotateX(180deg);
}

.tile-back {
  transform: rotateX(180deg);
  backface-visibility: hidden;
}
Try It Yourself

How It Works

The back face is rotated on the X axis, and hidden keeps the reverse side from showing during the vertical flip.

🧠 How backface-visibility Works

1

You create front and back faces

Two layers share the same space inside a 3D-transformed container.

Two faces
2

You rotate in 3D space

Use rotateY() or rotateX() with preserve-3d.

3D transform
3

You hide the reverse side

backface-visibility: hidden; prevents the back of each face from showing through.

hidden
=

Smooth flip animation

Only one card face is visible at a time, creating a clean flip effect.

Universal Browser Support

backface-visibility is supported in all modern browsers with 3D transform support.

Baseline · CSS Transforms

Use flip effects in modern browsers

Chrome, Firefox, Safari, Edge, and Opera support backface-visibility with 3D transforms.

98% Modern browser support
Google Chrome36+ · Desktop & Mobile
Full support
Mozilla Firefox16+ · Desktop & Mobile
Full support
Apple Safari9+ · macOS & iOS
Full support
Microsoft Edge12+ · Modern versions
Full support
Opera23+ · Modern versions
Full support

Legacy browsers

Very old browsers without 3D transform support also lack reliable flip-card behavior.

💻
Internet Explorer IE 10+ partial 3D support · Test carefully
Partial
backface-visibility property 98% supported

Bottom line: Use backface-visibility: hidden confidently in modern flip-card and 3D UI patterns.

Conclusion

The backface-visibility property is an essential part of 3D CSS animations. It lets you hide the reverse side of an element so flip cards and rotated panels look clean instead of showing mirrored or overlapping faces.

For most flip-card designs, use hidden on both front and back faces together with transform-style: preserve-3d and a pre-rotated back face.

💡 Best Practices

✅ Do

  • Use hidden on both faces in flip-card layouts
  • Combine it with perspective and preserve-3d
  • Pre-rotate the back face with rotateY(180deg) or rotateX(180deg)
  • Keep front and back content readable and accessible
  • Test the animation on touch devices as well as hover

❌ Don’t

  • Forget to rotate the back face before flipping
  • Expect a clean flip without a 3D transform setup
  • Hide content that still needs to be accessible mid-animation
  • Assume hover-only flips work for every user interaction
  • Mix 2D and 3D transforms without checking the final effect

Key Takeaways

Knowledge Unlocked

Five things to remember about backface-visibility

Use these points when building 3D flip animations.

5
Core concepts
👁02

visible Default

Back face can appear.

Default
📚03

Flip Cards

Use hidden for clean flips.

Use case
🧩04

Needs 3D

Works with rotateX/Y.

Rule
05

Two Keywords

visible or hidden only.

Values

❓ Frequently Asked Questions

The backface-visibility property controls whether the back side of an element is visible when the element is rotated in 3D space.
The initial value is visible, which means the back face can appear when the element is rotated away from the viewer.
Use hidden for flip cards and 3D animations where you only want the front-facing side to appear during rotation.
It is mainly useful with 3D transforms such as rotateX() and rotateY(), especially when transform-style: preserve-3d is enabled.
visible shows the reverse side during rotation, which can look mirrored or messy. hidden hides the reverse side so only the intended face is seen.

Practice in the Live Editor

Open the HTML editor, build a flip card, and test backface-visibility: hidden instantly.

HTML Editor →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful