Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Tags
- styled-component
- AWS
- e.preventDefault()
- s3
- CloudFront
- Django
- React
- code-server
- ci/cd
- docker
- 롤
- e.stopPropagation()
- GlobalStyle
- liunx
- ACM
- mysqlclient
- 전역스타일
- 자바스크립트
- 리액트
- nestjs
- riotapi
- 배포
- typeorm
- 카카오 로그인
- Recoil
- Object.freeze()
- requests
- route53
- Python
- Github Actions
Archives
- Today
- Total
목록전역스타일 (1)
군붕이의 메모장
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/cvWkly/btrFNGmXlNL/UNJ9HuM01KoQnHXizz9Nb0/img.png)
리액트를 사용할때 styled-component 라이브러리를 통해서 전역 스타일 지정이 가능하다. 전역스타일은 모든 html 요소에 대해서 공통적인 스타일을 가지는것이다. 예시로는 아래와 같다 모든 li 태그에서 list-style 제거하기 a 태그에서 text-decoration 제거하기 button 태그에 cursor: pointer 지정하기 만약 전역스타일을 사용하지 않는다면 각 페이지 마다 일일히 list-style: none, text-decoration: none 등을 적용해야된다. 1. styled-component 설치 -- 자바스크립트 환경에서의 설치 yarn add styled-components -- 타입스크립트 환경에서의 설치(추가설치필요) yarn add styled-compone..
웹 개발/프론트엔드
2022. 6. 26. 20:16