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
| <!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Animation simple</title>
<meta name="Author" content="NoSmoking">
<meta name="DVP-discussion" content="d2091325">
<meta name="description" content="">
<style>
.btn {
display: flex;
position: relative;
align-items: center;
width: 15em;
height: 5em;
border: 1px solid #069;
overflow: hidden;
cursor: pointer;
}
.btn .btn-icone {
position: absolute;
top: 0;
left: 100%;
box-sizing: border-box;
width: 5em;
height: 100%;
border: 4px solid currentColor;
border-radius: 50%;
color: #690;
background-color: #EFD;
transition: all .5s;
transform: translate( 0) rotate(180deg);
}
.btn:hover .btn-icone {
transform: translate( -100%) rotate(0deg);
}
</style>
</head>
<body>
<h1>Animation simple</h1>
<div class="btn">
Texte du button
<div class="btn-icone">
<svg width="100%" viewBox="0 0 16 16" fill="currentColor">
<path fill-rule="evenodd" d="M10.97 4.97a.75.75 0 011.071 1.05l-3.992 4.99a.75.75 0 01-1.08.02L4.324 8.384a.75.75 0 111.06-1.06l2.094 2.093 3.473-4.425a.236.236 0 01.02-.022z"></path>
</svg>
</div>
</div>
</body>
</html> |