티스토리 뷰
html
<div class="filebox">
<input class="upload-name" value="첨부파일" placeholder="첨부파일" readonly>
<label for="file">파일찾기</label>
<input type="file" id="file">
</div>
css
//input 스타일 변경
.filebox .upload-name {
display: inline-block;
height: 40px;
padding: 0 10px;
vertical-align: middle;
border: 1px solid #dddddd;
width: 78%;
color: #999999;
}
//label 스타일 변경
.filebox label {
display: inline-block;
padding: 10px 20px;
color: #fff;
vertical-align: middle;
background-color: #999999;
cursor: pointer;
height: 40px;
margin-left: 10px;
}
//기존 디자인 없애기
.filebox input[type="file"] {
position: absolute;
width: 0;
height: 0;
padding: 0;
overflow: hidden;
border: 0;
}
script
$("#file").on('change',function(){
var fileName = $("#file").val();
$(".upload-name").val(fileName);
});
버튼 커스텀 + 불러온 파일 경로값을 input에 담아주어야 함
https://velog.io/@sklove96/inputtypefile-%EC%BB%A4%EC%8A%A4%ED%85%80%ED%95%98%EA%B8%B0
https://helloinyong.tistory.com/275
https://gahyun-web-diary.tistory.com/83
'WebPublisher' 카테고리의 다른 글
[tip] Git 세팅하는 방법 (0) | 2021.11.09 |
---|---|
[html] 고정형 페이지 작업 (0) | 2021.11.09 |
[php] if 조건문으로 클래스 부여 (0) | 2021.11.09 |
[daterangepicker] 데이트피커 (0) | 2021.11.09 |
[jQuery/slick] 슬릭 슬라이더 내 텍스트에 애니메이션 주기 (0) | 2021.10.14 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 스티키효과
- 인쇄스크립트
- 에러이미지마크업
- calendarflipjavascript
- rwdImageMaps
- marquee css
- 자동인쇄script
- flipjavascriptanimation
- 2단레이아웃반응형
- calendarflipanimation
- php조건문축약형
- flipjavascript
- 이미지맵반응형
- marquee javascript
- 스크롤커스텀
- 이미지onerror
- 에러이미지속성
- flipanimation
- 퍼블리셔이직
- marquee html
- clockflipanimation
- phpif조건문
- sticky제이쿼리
- 그리드반응형
- php조건문
- a태그다운로드
- 경력직웹퍼블리셔이직
- 스크롤커스텀css
- 텍스트플로팅효과
- 흘러가는텍스트효과
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함