https://codepen.io/TryHardHusky/pen/KdQQVq
HTML
...이랄 것도 없고, 하나의 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
a {
width: 300px;
height: 100px;
font-size: 50px;
margin: auto;
line-height: 100px;
text-decoration: none;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
display: block;
border: solid 1px black;
text-align: center;
font-family: Arial, sans-serif;
text-transform: uppercase;
color: #666;
transition: all 500ms;
-webkit-transition: all 500ms;
-moz-transition: all 500ms;
z-index: 1;
}
a:after,
a:before {
display: block;
background: #333;
width: 0;
height: 100px;
content: "";
position: absolute;
-webkit-transition: all 500ms;
-moz-transition: all 500ms;
-ms-transition: all 500ms;
-o-transition: all 500ms;
transition: all 500ms;
z-index: -1;
}
a:after {
bottom: 0px;
left: 0px;
width: 50%:
}
a:before {
top: 0px;
right: 0px;
}
a:hover:after,
a:hover:before{
width: 100%;
}
|
cs |
728x90
'퍼블리싱 > HTML | CSS | Javascript' 카테고리의 다른 글
마우스 오버시 이미지가 자동으로 커지고 작아지고 하는 효과! 초간단 :P (0) | 2017.04.02 |
---|---|
google map api 사용법 (한 페이지에 다수의 구글맵 가능) (0) | 2017.04.02 |
마음에 드는 버튼스타일 (0) | 2017.04.02 |
placeholder의 색상 바꾸기 (0) | 2017.04.02 |
display: table (0) | 2017.04.02 |