-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCSS-border-radius-transition.html
138 lines (119 loc) · 3.33 KB
/
CSS-border-radius-transition.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
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Transitions with border-radius and RGBa</title>
<style>
* {
margin: 0;
}
body {
font: 2.25rem arial, helvetica, sans-serif;
color: #000;
background: #06c;
}
h1 {
margin: 2.5rem;
font-size: 1.5rem;
color: white;
text-align: center;
}
p {
height: 22.5rem;
padding: 1.5rem;
}
a,
img {
display: block;
margin: 0 auto;
color: rgba(255, 255, 255, 0.5);
text-align: center;
text-decoration: none;
-webkit-transition: 0.5s;
transition: 0.5s;/*to define speed/time of hover effect*/
}
a:hover {
background: rgba(255, 255, 255, 0.5);
color: white;
border-color: white;
}
#convert {
background: rgba(221, 10, 10, 0.3);
}
#convert a {
height: 7.5rem;
width: 7.5rem;
padding: 4rem;
border-radius: 5rem;
border: 3.75rem solid rgba(255, 255, 255, 0.5);
}
#convert a:hover {
border-radius: 50%;
}
#color {
background: rgba(0, 0, 0, 0.2);
}
#bg-gradient {
background: rgba(0, 0, 0, 0.514);
}
#color a,
#bg-gradient a {
width: 5rem;
height: 5rem;
padding: 2.5rem;
border-radius: 3.75rem;
border: 2.5rem solid rgba(255, 255, 255, 0.5);
margin: 3.75rem auto;
font-size: 1.5rem;
}
#color a:hover {
height: 7.5rem;
width: 7.5rem;
padding: 3.75rem;
border-width: 3.75rem;
border-radius: 50%;
font-size: 2.25rem;
margin: 0 auto; /* To make it fixed on initial position */
}
#bg-gradient a:hover {
height: 2.5rem;
width: 2.5rem;
padding: 1.25rem;
font-size: 0.75rem;
border-width: 1.25rem;
border-radius: 3.75rem;
margin: 7.5rem auto;
}
#learn a {
width: 7rem;
margin-top: 7.8rem;
background: white;
border: 0.625rem solid white;
border-radius: 0.625rem;
opacity: 0.7;
}
#learn a:hover {
background: white;
box-shadow: 0 0 6rem 3.125rem rgba(255, 255, 255, 0.5);
opacity: 1;
}
</style>
</head>
<body>
<h1>Transitions with border-radius and RGBa</h1>
<hr />
<p id="convert">
<a href="https://nekocalc.com/px-to-rem-converter">Covert PX to REM</a>
</p>
<p id="color"><a href="https://htmlcolors.com/">Pick your color</a></p>
<p id="bg-gradient">
<a href="https://webgradients.com/">Choose your BG Gradient</a>
</p>
<p id="learn">
<a href="https://www.coursera.org/programs/leading-university-on-coursera-jka3d"><img src="img/arrow.png"
alt="" />
</a>
</p>
</body>
</html>