Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitecc196b

Browse files
committed
Added Project 33
1 parent8dc1ed7 commitecc196b

File tree

5 files changed

+251
-0
lines changed

5 files changed

+251
-0
lines changed

‎33 - Input Focus Effects/._index.html

4 KB
Binary file not shown.
2.27 KB
Loading
3.85 KB
Loading

‎33 - Input Focus Effects/index.html

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<!DOCTYPE html>
2+
<htmllang="en">
3+
<head>
4+
<metacharset="UTF-8"/>
5+
<metahttp-equiv="X-UA-Compatible"content="IE=edge"/>
6+
<metaname="viewport"content="width=device-width, initial-scale=1.0"/>
7+
<linkrel="stylesheet"href="style.css"/>
8+
<title>Input Focus Effects</title>
9+
</head>
10+
<body>
11+
<divclass="container">
12+
<divclass="input-group">
13+
<input
14+
type="text"
15+
name=""
16+
id=""
17+
class="effect-1"
18+
placeholder="Effect 1"
19+
/>
20+
<spanclass="border"></span>
21+
</div>
22+
<divclass="input-group">
23+
<input
24+
type="text"
25+
name=""
26+
id=""
27+
class="effect-2"
28+
placeholder="Effect 2"
29+
/>
30+
<spanclass="border"></span>
31+
</div>
32+
<divclass="input-group">
33+
<input
34+
type="text"
35+
name=""
36+
id=""
37+
class="effect-3"
38+
placeholder="Effect 3"
39+
/>
40+
<spanclass="border"></span>
41+
</div>
42+
43+
<divclass="input-group">
44+
<inputtype="text"id="effect4"class="effect-4"placeholder=""/>
45+
<labelfor="effect4">Effect 4</label>
46+
</div>
47+
48+
<divclass="input-group">
49+
<inputtype="text"id="effect5"class="effect-5"placeholder=""/>
50+
<labelfor="effect5">Effect 5</label>
51+
</div>
52+
53+
<divclass="input-group overflow-hidden">
54+
<inputtype="text"name=""id=""class="effect-6"/>
55+
<spanclass="bg"></span>
56+
</div>
57+
58+
<divclass="input-group">
59+
<inputtype="text"name=""id=""class="effect-7"/>
60+
</div>
61+
</div>
62+
</body>
63+
</html>

‎33 - Input Focus Effects/style.css

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
* {
2+
box-sizing: border-box;
3+
}
4+
5+
body {
6+
margin:0;
7+
font-family:"Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
8+
}
9+
10+
/* Global Styles */
11+
.container {
12+
max-width:1200px;
13+
margin:0 auto;
14+
display: grid;
15+
grid-template-columns:repeat(3,1fr);
16+
padding:1rem;
17+
gap:1.5rem;
18+
}
19+
20+
.input-group {
21+
position: relative;
22+
margin:1.5rem0;
23+
}
24+
25+
input {
26+
border: none;
27+
outline: none;
28+
padding:0.75rem;
29+
font-size:1.5rem;
30+
width:100%;
31+
}
32+
33+
.overflow-hidden {
34+
overflow: hidden;
35+
}
36+
37+
/* effect 1 */
38+
.effect-1 {
39+
border-bottom:2px solid#ccc;
40+
padding-left:0;
41+
}
42+
43+
.effect-1+ .border {
44+
position: absolute;
45+
bottom:0;
46+
left:0;
47+
width:0%;
48+
height:2px;
49+
background-color:#4caf50;
50+
transition:0.5s;
51+
}
52+
53+
.effect-1:focus+ .border {
54+
width:100%;
55+
}
56+
57+
/* effect 2 */
58+
.effect-2 {
59+
border-bottom:2px solid#ccc;
60+
padding-left:0;
61+
}
62+
63+
.effect-2+ .border {
64+
position: absolute;
65+
bottom:0;
66+
right:0;
67+
width:0%;
68+
height:2px;
69+
background-color:#4caf50;
70+
transition:0.5s;
71+
}
72+
73+
.effect-2:focus+ .border {
74+
width:100%;
75+
}
76+
/* effect 3 */
77+
.effect-3 {
78+
border-bottom:2px solid#ccc;
79+
padding-left:0;
80+
}
81+
82+
.effect-3+ .border {
83+
position: absolute;
84+
bottom:0;
85+
left:50%;
86+
transform:translateX(-50%)scale(0);
87+
width:100%;
88+
height:2px;
89+
background-color:#4caf50;
90+
transition:0.5s;
91+
}
92+
93+
.effect-3:focus+ .border {
94+
transform:translateX(-50%)scale(1);
95+
}
96+
97+
/* Effect 4 */
98+
.effect-4 {
99+
border:2px solid#ccc;
100+
border-radius:0.25rem;
101+
}
102+
103+
.effect-4+label {
104+
position: absolute;
105+
top:50%;
106+
transform:translateY(-50%);
107+
left:0.75rem;
108+
color:#ccc;
109+
padding:00.125rem;
110+
transition:0.4s;
111+
}
112+
113+
.effect-4:focus {
114+
border-color:#4caf50;
115+
}
116+
117+
.effect-4:focus+label,
118+
.effect-4:not(:placeholder-shown)+label {
119+
top:0;
120+
transition:0.3s;
121+
background-color:#fff;
122+
color:#4caf50;
123+
}
124+
125+
/* Effect 5 */
126+
.effect-5 {
127+
border-bottom:2px solid#ccc;
128+
padding-left:0;
129+
}
130+
131+
.effect-5+label {
132+
position: absolute;
133+
top:50%;
134+
left:0;
135+
transform:translateY(-50%);
136+
color:#ccc;
137+
transition:0.4s;
138+
}
139+
140+
.effect-5:focus {
141+
border-color:#4caf50;
142+
}
143+
144+
.effect-5:focus+label,
145+
.effect-5:not(:placeholder-shown)+label {
146+
top:0;
147+
transition:0.3s;
148+
background-color:#fff;
149+
color:#4caf50;
150+
}
151+
152+
/* Effect 6 */
153+
.effect-6 {
154+
border:2px solid#ccc;
155+
border-radius:0.25rem;
156+
background-color: transparent;
157+
}
158+
159+
.effect-6+ .bg {
160+
position: absolute;
161+
top:0;
162+
left:0;
163+
height:100%;
164+
width:0%;
165+
background-color:#efefef;
166+
z-index:-1;
167+
border-top-right-radius:3rem;
168+
border-bottom-right-radius:3rem;
169+
transition:0.5s;
170+
}
171+
172+
.effect-6:focus+ .bg {
173+
width:120%;
174+
}
175+
176+
/* Effect 7 */
177+
.effect-7 {
178+
border:2px solid#ccc;
179+
border-radius:0.25rem;
180+
background:url("./assets/search-icon.png") no-repeat5px;
181+
background-size:2.1875rem;
182+
padding-left:45px;
183+
}
184+
185+
.effect-7:focus {
186+
border-color:#4caf50;
187+
background-image:url("./assets/search-icon2.png");
188+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp