ExpressYourself
Registered
Как мога да променя стила на type=file искам да сложа картинка вместо полети и бутона..
Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
shterev каза:ми то можеш да скриеш о тпя инпут който ти е от линка на примера, какво е толкова трудно?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<title>Стилизиране на file input</title>
<style>
form {
position:relative; /* да бъде абсолютно позиционирани елементи във вътрешността на формата */
padding:0;
margin:0;
}
#mask {
width:283px; /* С този код правим маската на бутона */
height:37px;
padding:3px 100px 0 10px;
background:url(inputtypefile.png) no-repeat 0 0;
}
#fileInput {
width:393px; /* Определяме ширината */
height:40px;
position:absolute;/* позициониране на това input type=file */
left:0;
top:0;
opacity: 0;/* нулева видимост */
filter:alpha(opacity=0);
}
#fileInputText {
border:1px solid #FFF;
width:100%;
font-size:22px;
}
</style>
</head>
<body>
<form action="#">
<input type="file" id="fileInput" size="49" onchange="document.getElementById('fileInputText').value = this.value;" />
<div id="mask">
<input type="text" id="fileInputText" />
</div>
</form>
</body>
</html>
shterev каза:от линка който @логик ти е дал, просто полето с тип текст го направи да не се вижда