forked from eracom/exemples-javascript
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gradient-corners.html
executable file
·69 lines (55 loc) · 1.37 KB
/
gradient-corners.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
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<title>Gradient Corners</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/normalize.min.css">
<link rel="stylesheet" href="css/main.css">
<script src='js/prefixfree.min.js'></script>
<style>
body {
background: #ddd;
display: flex;
flex-direction: column;
}
.colors {
position: absolute;
right: 0;
top: 3em;
text-align: right;
display: flex;
flex-direction: column;
align-items: flex-end;
}
.colors li {
list-style: none;
padding: 1em 1em 2em 1em;
width: 7em;
color: transparent;
background-color: #888;
margin-top: -15px;
/* duree de transition (sortie) */
transition: width 0s, color 0s;
}
.colors li:hover {
background: linear-gradient(0deg, transparent 15px, SlateBlue 0),
linear-gradient(45deg, transparent 10px, DarkSlateBlue 0);
width: 30vw;
color: #fff;
/* duree de transition au survol (entrée) */
transition: width 0.5s, color 0.5s;
}
</style>
</head>
<body>
<main class="cadre">
<ul class="colors">
<li><span>Color 1</span></li>
<li><span>Color 2</span></li>
<li><span>Color 3</span></li>
</ul>
</main>
</body>
</html>