console
<link href="https://fonts.googleapis.com/css2?family=Allerta+Stencil&display=swap" rel="stylesheet">
<button class="noselect">开始</button>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
height: 100vh;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
background-color: #e9bcb7;
background-image: linear-gradient(315deg, #e9bcb7 0%, #29524a 74%);
}
.noselect {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
}
button {
width: 150px;
height: 50px;
cursor: pointer;
background-color: #e9bcb7;
background-image: linear-gradient(315deg, #e9bcb7 0%, #29524a 74%);
font-family: 'Allerta Stencil', sans-serif;
color: #e9bcb7;
font-size: 16px;
border: none;
background-size: 500%;
background-position: left;
transition: 1s;
}
button:hover {
color: #29524a;
background-position: right;
}
button:focus {
outline: none;
}