mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 05:00:22 +08:00
104 lines
1.8 KiB
HTML
104 lines
1.8 KiB
HTML
<button class="download">
|
|
Download
|
|
<span class="tooltip">10Mo</span>
|
|
</button>
|
|
|
|
<style>
|
|
/* From Uiverse.io by Yaya12085 - Tags: button */
|
|
.download {
|
|
background: none;
|
|
border: 0;
|
|
box-sizing: border-box;
|
|
margin: 1em;
|
|
padding: 1em 2em;
|
|
color: #039be5;
|
|
background-color: #fff;
|
|
font-size: inherit;
|
|
font-weight: 700;
|
|
position: relative;
|
|
vertical-align: middle;
|
|
border-radius: 4px;
|
|
box-shadow: 0px 20px 30px -15px rgba(0, 0, 0, 0.226);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.download::before, .download::after {
|
|
box-sizing: inherit;
|
|
border-radius: inherit;
|
|
content: "";
|
|
position: absolute;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.download {
|
|
transition: color 0.25s;
|
|
}
|
|
|
|
.download::before, .download::after {
|
|
border: 2px solid transparent;
|
|
width: 0;
|
|
height: 0;
|
|
}
|
|
|
|
.download::before {
|
|
top: 0;
|
|
left: 0;
|
|
}
|
|
|
|
.download::after {
|
|
bottom: 0;
|
|
right: 0;
|
|
}
|
|
|
|
.download:focus {
|
|
color: #039be5;
|
|
}
|
|
|
|
.download:focus::before, .download:focus::after {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.download:focus::before {
|
|
border-top-color: #039be5;
|
|
border-right-color: #039be5;
|
|
transition: width 0.25s ease-out, height 0.25s ease-out 0.25s;
|
|
}
|
|
|
|
.download:focus::after {
|
|
border-bottom-color: #039be5;
|
|
border-left-color: #039be5;
|
|
transition: border-color 0s ease-out 0.5s, width 0.25s ease-out 0.5s, height 0.25s ease-out 0.75s;
|
|
}
|
|
|
|
.download .tooltip {
|
|
visibility: hidden;
|
|
width: 120px;
|
|
background-color: #039be5;
|
|
color: #fff;
|
|
text-align: center;
|
|
border-radius: 6px;
|
|
padding: 5px 0;
|
|
position: absolute;
|
|
z-index: 1;
|
|
bottom: 120%;
|
|
left: 50%;
|
|
margin-left: -60px;
|
|
}
|
|
|
|
.download .tooltip::after {
|
|
content: "";
|
|
position: absolute;
|
|
top: 100%;
|
|
left: 50%;
|
|
margin-left: -5px;
|
|
border-width: 5px;
|
|
border-style: solid;
|
|
border-color: #039be5 transparent transparent transparent;
|
|
}
|
|
|
|
.download:hover:not(:focus) .tooltip {
|
|
visibility: visible;
|
|
}
|
|
</style>
|