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 |
Tags
- There isn’t anything to compare
- bootstrap
- SCSS
- 컨디셔널 렌더링
- icon
- API token
- ngrok설치
- input type=file
- createGlobalStyle
- nextjs 설치
- github
- npm styled-reset
- nextjs
- fetch
- github io
- react env
- typescript react
- git lab
- styled components
- nextjs .env
- Git
- react
- rewrites
- API 토큰
- react typescript
- ngrok실행
- dart 변수
- getModifierState
- next.js css
- CSS
Archives
- Today
- Total
목록input type=file (1)
꾸준히 성장하는 개발자

button을 클릭했을 때 파일 업로드를 하고 바로 띄워줄 수 있는 버튼을 만들고 싶다 파일을 업로드 하는건 type='file'의 속성의 input 태그를 이용한다. 이렇게 입력하면 아래 사진처럼만 나오는데 난 옆에 선택된 파일없음 도 안 나오게 하고 싶고 버튼도 커스텀을 하고 싶다. 그래서 하는 방법이 label 태그와 input 태그를 연결해 주고 label태그를 꾸며주고 input 태그를 숨겨주면 되는 것이다. 먼저 label과 input이 연결하는 방법은 label의 for와 input의 id를 같게 넣어주면 된다. 그리고input 태그를 숨겨야 하는데 opacity :0으로 숨겨줘야 한다. 중요한 건 display:none / visibility: hidden 하면 안 된다!! 접근성 보조 기..
HTML
2022. 7. 18. 04:24