[React Swiper] import css 안될 때

2023. 4. 13. 21:56·Frontend/React
목차
  1. 이상하게 위와 같이 import하면 안된다?
  2. 해결방법은

공식문서에 보면 get started 에서 css import하는 방식을

  // import Swiper and modules styles
  import 'swiper/css';
  import 'swiper/css/navigation';
  import 'swiper/css/pagination';

위와 같이 작성하면 된다고 적혀있는데 

 

이상하게 위와 같이 import하면 안된다?

이유는 나도 모르겠다...

 

해결방법은

import "swiper/swiper-bundle.css";

 

이렇게 import하면 잘된다!!

 

 

 

공식문서

get started

https://swiperjs.com/get-started

 

Getting Started With Swiper

Swiper is the most modern free mobile touch slider with hardware accelerated transitions and amazing native behavior.

swiperjs.com

css

https://swiperjs.com/swiper-api#css-styles

 

Swiper API

Swiper is the most modern free mobile touch slider with hardware accelerated transitions and amazing native behavior.

swiperjs.com

 

반응형

'Frontend > React' 카테고리의 다른 글

[React Chart] 리액트 chart.js tooltip custom 하기  (1) 2023.04.24
[React Swiper] loop={true} 마지막 페이지 먼저보이는 에러  (0) 2023.04.13
[React Swiper] play, stop 버튼 만들기  (1) 2023.04.13
[React Swiper] 리액트에서 스와이퍼 사용하기  (0) 2023.04.13
[React] 리액트 순위 매기기 만들기 (ranking)  (0) 2023.02.26
  1. 이상하게 위와 같이 import하면 안된다?
  2. 해결방법은
'Frontend/React' 카테고리의 다른 글
  • [React Chart] 리액트 chart.js tooltip custom 하기
  • [React Swiper] loop={true} 마지막 페이지 먼저보이는 에러
  • [React Swiper] play, stop 버튼 만들기
  • [React Swiper] 리액트에서 스와이퍼 사용하기
전예방
전예방
  • 전예방
    예방이의 개발일기
    전예방
  • 전체
    오늘
    어제
    • All (125)
      • Info & Tip (2)
      • 유용한 사이트들 (5)
      • Mark Up & StyleSheet (23)
        • HTML (6)
        • CSS & SCSS (10)
        • 반응형 (6)
      • Frontend (66)
        • 전체 (10)
        • JavaScript & Jquery (18)
        • TypeScript (0)
        • React (26)
        • Next.js (3)
        • 성능최적화 (2)
        • 웹접근성 (2)
      • Backend (13)
        • Python (1)
        • JAVA (2)
        • node.js (0)
        • PHP (7)
        • 패키지매니저 (3)
      • Markdown (0)
      • SCM (1)
        • Git&Github (1)
        • SVN (0)
      • IDE (4)
        • VSCode (2)
        • IntelliJ (1)
        • Ecplise (1)
      • 취미생활 (3)
      • 정보처리기사 (2)
      • 코딩자율학습단 (5)
        • 12기 (파이썬) (5)
  • 블로그 메뉴

    • 홈
    • 태그
  • 링크

    • velog
    • github
  • 공지사항

  • 인기 글

  • 태그

    리액트
    Python
    swiper.js
    TypeScript
    Chart.js
    코딩자율학습단
    php
    Admin
    yarn berry
    frontend
    회원가입
    반응형
    관리자 페이지
    파이썬
    react
    CSS
    나도코딩
    NPM
    React Swiper
    코딩자율학습
  • 최근 댓글

  • 최근 글

  • 반응형
  • hELLO· Designed By정상우.v4.10.3
전예방
[React Swiper] import css 안될 때

개인정보

  • 티스토리 홈
  • 포럼
  • 로그인
상단으로

티스토리툴바

단축키

내 블로그

내 블로그 - 관리자 홈 전환
Q
Q
새 글 쓰기
W
W

블로그 게시글

글 수정 (권한 있는 경우)
E
E
댓글 영역으로 이동
C
C

모든 영역

이 페이지의 URL 복사
S
S
맨 위로 이동
T
T
티스토리 홈 이동
H
H
단축키 안내
Shift + /
⇧ + /

* 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.