CSS 代码规范排序:提高代码可读性和维护性
<style>
body {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
}
.center {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
}
form {
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
background-color: #fff;
}
label {
margin-bottom: 10px;
}
input[type='password'] {
padding: 10px;
border-radius: 5px;
border: 1px solid #ccc;
font-size: 16px;
box-sizing: border-box;
}
button {
margin-top: 20px;
padding: 10px 20px;
border-radius: 5px;
background-color: #2ecc71;
color: #fff;
font-size: 16px;
border: none;
cursor: pointer;
box-sizing: border-box;
}
.refresh-button {
background-color: #4CAF50;
color: white;
border: none;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.refresh-button:hover {
background-color: #3e8e41;
}
</style>
原文地址: https://www.cveoy.top/t/topic/mmYA 著作权归作者所有。请勿转载和采集!