Skip to content

Commit

Permalink
feat : 트리카드 back 3d, webkit css 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
spolice0324 committed Feb 29, 2024
1 parent 1755dd6 commit fc09955
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/compositions/tree-card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ const TreeCard = ({
<motion.div
id={id}
variants={fadeInProps.variants}
className={cn('w-[104px] h-[110px] cursor-pointer relative')}
className={cn('w-[104px] h-[110px] cursor-pointer relative', {
'preserve-3d': isFlipped,
})}
style={{ transformStyle: 'preserve-3d' }}
onClick={handleCardClick}
>
<div
Expand Down
5 changes: 5 additions & 0 deletions styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,23 @@
display: flex;
justify-content: center;
align-items: center;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}

.card .card-back {
transform: rotateY(180deg);
-webkit-transform: rotateY(180deg);
}

.card .card-front,
.card .card-back {
width: 100%;
height: 100%;
overflow: hidden;

-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
html {
-webkit-text-size-adjust: none;
Expand Down

0 comments on commit fc09955

Please sign in to comment.