
이번 글을 통해 배워갈 내용
- 자바스크립트 없이 카드를 뒤집는 방법을 배워보겠습니다.
아래와 같은 card flipping을 구현해보겠습니다.

리액트와 module.css를 사용하였지만
html과 css만을 사용하였기 때문에 조금 바꿔서
다른 라이브러리를 쓰셔도 무방합니다.
body는 아래와 같이 정의했습니다
그리고
card.module.css는 아래와 같이 정의했습니다
카드는 아래와 같이 만들었습니다
설명이 필요하신 분만 아래를 읽어주시면 됩니다.
카드 컴포넌트와 card.css 안에
inner와 front, back의 클래스들을 넣어두었고
perspective 성질을 이용해서 z 평면을 기준으로 180도씩 돌려서
앞면과 뒷면을 구현했습니다.
컴퓨터 세상에는 때로는 복잡해 보이는 게
간단할 수 있다는 하나의 예시인 것 같습니다.
읽어주셔서 감사합니다 좋은 하루 보내세요~
참조 및 인용
https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow
box-shadow - CSS: Cascading Style Sheets | MDN
The box-shadow CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color.
developer.mozilla.org
https://developer.mozilla.org/en-US/docs/Web/CSS/perspective
perspective - CSS: Cascading Style Sheets | MDN
The perspective CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective.
developer.mozilla.org
'Javascript > 웹 기타' 카테고리의 다른 글
CSS 기본 스타일 무시하는 한가지 방법 (0) | 2022.07.21 |
---|---|
json-server Invoke-WebRequest문제를 해결하는 한가지 방법 (0) | 2022.07.12 |
HTML tag 안에 data attribute 저장하기 (0) | 2022.05.08 |
Azure Functions 로컬에 구현해보기와 3가지 꿀팁 (0) | 2022.05.04 |
Javascript 없이 CSS,SVG로 멋진 Loading bar 효과 구현해보기 (0) | 2022.04.10 |

이번 글을 통해 배워갈 내용
- 자바스크립트 없이 카드를 뒤집는 방법을 배워보겠습니다.
아래와 같은 card flipping을 구현해보겠습니다.

리액트와 module.css를 사용하였지만
html과 css만을 사용하였기 때문에 조금 바꿔서
다른 라이브러리를 쓰셔도 무방합니다.
body는 아래와 같이 정의했습니다
그리고
card.module.css는 아래와 같이 정의했습니다
카드는 아래와 같이 만들었습니다
설명이 필요하신 분만 아래를 읽어주시면 됩니다.
카드 컴포넌트와 card.css 안에
inner와 front, back의 클래스들을 넣어두었고
perspective 성질을 이용해서 z 평면을 기준으로 180도씩 돌려서
앞면과 뒷면을 구현했습니다.
컴퓨터 세상에는 때로는 복잡해 보이는 게
간단할 수 있다는 하나의 예시인 것 같습니다.
읽어주셔서 감사합니다 좋은 하루 보내세요~
참조 및 인용
https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow
box-shadow - CSS: Cascading Style Sheets | MDN
The box-shadow CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color.
developer.mozilla.org
https://developer.mozilla.org/en-US/docs/Web/CSS/perspective
perspective - CSS: Cascading Style Sheets | MDN
The perspective CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective.
developer.mozilla.org
'Javascript > 웹 기타' 카테고리의 다른 글
CSS 기본 스타일 무시하는 한가지 방법 (0) | 2022.07.21 |
---|---|
json-server Invoke-WebRequest문제를 해결하는 한가지 방법 (0) | 2022.07.12 |
HTML tag 안에 data attribute 저장하기 (0) | 2022.05.08 |
Azure Functions 로컬에 구현해보기와 3가지 꿀팁 (0) | 2022.05.04 |
Javascript 없이 CSS,SVG로 멋진 Loading bar 효과 구현해보기 (0) | 2022.04.10 |