답변 1개
채택된 답변
+20 포인트
6년 전
아래 소스를 참고해보세요.
input type="file"을 이용하고, css를 조정해 이미지 형태로 둔갑시킵니다.
HTML 코드
</p>
<p><div class="file_input"></p>
<p> <label></p>
<p> File Attach</p>
<p> <input type="file" onchange="javascript:document.getElementById('file_route').value=this.value"></p>
<p> </label></p>
<p> <input type="text" readonly="readonly" title="File Route" id="file_route"></p>
<p></div></p>
<p>
CSS코드
</p>
<p>.file_input label {
position:relative;
cursor:pointer;
display:inline-block;
vertical-align:middle;
overflow:hidden;
width:100px;
height:30px;
background:#777;
color:#fff;
text-align:center;
line-height:30px;
}
.file_input label input {
position:absolute;
width:0;
height:0;
overflow:hidden;
}
.file_input input[type=text] {
vertical-align:middle;
display:inline-block;
width:400px;
height:28px;
line-height:28px;
font-size:11px;
padding:0;
border:0;
border:1px solid #777;
}</p>
<p>
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인