-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
52 lines (51 loc) · 1.32 KB
/
index.html
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Default Text demo</title>
<link type="text/css" rel="stylesheet" href="jquery.input-placeholder.css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.input-placeholder.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(':input').inputDefault();
$('#test3').focus(function(){
$(this).animate({
'width': '+=100'
}, 700);
}).blur(function(){
$(this).animate({
'width': '-=100'
}, 700);
});
});
</script>
<style type="text/css">
input.styled{
font-size: 18px;
font-weight: bold;
background: tomato;
padding: 5px;
border-radius: 14px;
color: purple;
border: 2px solid green;
}
input.styled:focus{
border: 2px solid red;
}
</style>
</head>
<body>
<input type="text" name="test" placeholder="placeholder" />
<br>
<br>
<input type="text" name="test2" id="test2" placeholder="very long placeholder that doesn't fit the input" />
<br>
<br>
<textarea id="test3" name="test3" placeholder="very long placeholder in a flexible field"></textarea>
<br>
<br>
<input type="text" name="test4" class="styled" placeholder="placeholder for styled input" />
<br>
</body>
</html>