پیشنمایش زنده
کد HTML
<button
class="inline-block rounded-full border-2 border-rose-500 text-rose-500 hover:border-rose-600 hover:bg-rose-400 hover:bg-opacity-10 hover:text-rose-600 focus:border-rose-700 focus:text-rose-700 active:border-rose-800 active:text-rose-800 dark:border-rose-300 dark:text-rose-300 dark:hover:hover:bg-rose-300 px-6 pb-2 pt-2.5 text-xs font-medium uppercase leading-normal transition duration-150 ease-in-out focus:outline-none focus:ring-0"
type="button"
>
<div
role="status"
class="inline-block h-3 w-3 mr-2 animate-spin rounded-full border-2 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]"
>
<span
class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"
>
Loading...
</span>
</div>
Loading
</button>
کد CSS
.\!absolute {
position: absolute !important;
}
.\!-m-px {
margin: -1px !important;
}
.mr-2 {
margin-right: 0.5rem;
}
.inline-block {
display: inline-block;
}
.\!h-px {
height: 1px !important;
}
.h-3 {
height: 0.75rem;
}
.\!w-px {
width: 1px !important;
}
.w-3 {
width: 0.75rem;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.animate-spin {
animation: spin 1s linear infinite;
}
.\!overflow-hidden {
overflow: hidden !important;
}
.\!whitespace-nowrap {
white-space: nowrap !important;
}
.rounded-full {
border-radius: 9999px;
}
.\!border-0 {
border-width: 0px !important;
}
.border-2 {
border-width: 2px;
}
.border-solid {
border-style: solid;
}
.border-current {
border-color: currentColor;
}
.border-rose-500 {
--tw-border-opacity: 1;
border-color: rgb(244 63 94 / var(--tw-border-opacity));
}
.border-r-transparent {
border-right-color: transparent;
}
.\!p-0 {
padding: 0px !important;
}
.px-6 {
padding-left: 1.5rem;
padding-right: 1.5rem;
}
.pb-2 {
padding-bottom: 0.5rem;
}
.pt-2 {
padding-top: 0.5rem;
}
.pt-2\.5 {
padding-top: 0.625rem;
}
.align-\[-0\.125em\] {
vertical-align: -0.125em;
}
.text-xs {
font-size: 0.75rem;
line-height: 1rem;
}
.font-medium {
font-weight: 500;
}
.uppercase {
text-transform: uppercase;
}
.leading-normal {
line-height: 1.5;
}
.text-rose-500 {
--tw-text-opacity: 1;
color: rgb(244 63 94 / var(--tw-text-opacity));
}
.transition {
transition-property: color, background-color, border-color, fill, stroke,
opacity, box-shadow, transform, filter, -webkit-text-decoration-color,
-webkit-backdrop-filter;
transition-property: color, background-color, border-color,
text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter,
backdrop-filter;
transition-property: color, background-color, border-color,
text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter,
backdrop-filter, -webkit-text-decoration-color, -webkit-backdrop-filter;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 150ms;
}
.duration-150 {
transition-duration: 150ms;
}
.ease-in-out {
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.\!\[clip\:rect\(0\2c 0\2c 0\2c 0\)\] {
clip: rect(0, 0, 0, 0) !important;
}
.hover\:border-rose-600:hover {
--tw-border-opacity: 1;
border-color: rgb(225 29 72 / var(--tw-border-opacity));
}
.hover\:bg-rose-400:hover {
--tw-bg-opacity: 1;
background-color: rgb(251 113 133 / var(--tw-bg-opacity));
}
.hover\:bg-opacity-10:hover {
--tw-bg-opacity: 0.1;
}
.hover\:text-rose-600:hover {
--tw-text-opacity: 1;
color: rgb(225 29 72 / var(--tw-text-opacity));
}
.focus\:border-rose-700:focus {
--tw-border-opacity: 1;
border-color: rgb(190 18 60 / var(--tw-border-opacity));
}
.focus\:text-rose-700:focus {
--tw-text-opacity: 1;
color: rgb(190 18 60 / var(--tw-text-opacity));
}
.focus\:outline-none:focus {
outline: 2px solid transparent;
outline-offset: 2px;
}
.focus\:ring-0:focus {
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0
var(--tw-ring-offset-width) var(--tw-ring-offset-color);
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0
calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow),
var(--tw-shadow, 0 0 #0000);
}
.active\:border-rose-800:active {
--tw-border-opacity: 1;
border-color: rgb(159 18 57 / var(--tw-border-opacity));
}
.active\:text-rose-800:active {
--tw-text-opacity: 1;
color: rgb(159 18 57 / var(--tw-text-opacity));
}
@media (prefers-reduced-motion: reduce) {
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.motion-reduce\:animate-\[spin_1\.5s_linear_infinite\] {
animation: spin 1.5s linear infinite;
}
}
@media (prefers-color-scheme: dark) {
.dark\:border-rose-300 {
--tw-border-opacity: 1;
border-color: rgb(253 164 175 / var(--tw-border-opacity));
}
.dark\:text-rose-300 {
--tw-text-opacity: 1;
color: rgb(253 164 175 / var(--tw-text-opacity));
}
.dark\:hover\:hover\:bg-rose-300:hover:hover {
--tw-bg-opacity: 1;
background-color: rgb(253 164 175 / var(--tw-bg-opacity));
}
}