照常我们先上效果(先上dj,先上djbushi
):
Document - Google Chrome 2022-05-18 22-21-07
我们先制作一个这样的简单页面
html及css代码如下:
<style>
* {
margin: 0;
padding: 0;
list-style: none;
box-sizing: border-box;
}
:root {
--mian-color: #0096d9;
}
html {
font-size: 62.5%;
}
body {
height: 100vh;
padding-top: 100px;
background-color: #eee;
}
.container {
width: 400px;
height: 500px;
margin: 0 auto;
text-align: center;
}
h1 {
font-size: 2.6rem;
color: var(--mian-color);
}
.ipts {
height: 40px;
display: flex;
justify-content: space-between;
}
input, select {
border: 0;
outline: 0;
background-color: transparent;
height: 40px;
line-height: 40px;
width: 40%;
margin-top: 2rem;
}
select {
border: 1px solid lightgray;
}
input {
text