简单的注册和模块+CSS选择器
16lz
2021-07-02
注册和模块+CSS选择器
简单的注册方式
- 效果图
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<h3>注册</h3>
<form action="check.php" name="get" onsubmit="return false">
<label for="username">账号:</label>
<input
type="text"
id="username"
name="username"
autofocus
required
placeholder="至少6位以上"
/>
<div>
<label for="psw">密码:</label>
<input
type="password"
id="psw"
name="psw"
required
placeholder="至少6位以上"
/>
</div>
<div>
<label for="email">邮箱注册:</label>
<input
type="email"
name="email"
id="email"
autofocus
required
placeholder="123456@qq.com"
/>
</div>
<div>
<label for="secret">性别:</label>
<input type="radio" name="gender" value="male" /><label for=""
>男</label
>
<input type="radio" name="gender" value="female" /><label for=""
>女</label
>
<input
type="radio"
name="gender"
value="secret"
checked
id="secret"
/><label for="">保密</label>
</div>
<div>
<label>爱好:</label>
<input type="checkbox" name="hobby[]" id="game" /><label for=""
>游戏</label
>
<input type="checkbox" name="hobby[]" id="trawe" checked /><label for=""
>旅游</label
>
<input type="checkbox" name="hobby[]" id="shoos" checked /><label for=""
>摄影</label
>
</div>
<div>
<select name="level" id="">
<option value="1">黄牌</option>
<option value="2">金牌</option>
<option value="3" selected>钻石</option>
</select>
</div>
<div>
<label for="">搜索:</label>
<input type="search" name="search" list="keywords" />
<datalist id="keywords">
<option value="美女"></option>
<option value="丑八怪"></option>
<option value="帅哥"></option>
<option value="大哥"></option>
<option value="大姐"></option>
</datalist>
</div>
<button>提交</button>
</form>
</body>
</html>
模块和CSS的选择器认识
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>模块和CSS选择器的使用</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
a {
color: rgb(247, 16, 16);
text-decoration: none;
}
body {
height: 100vh;
display: flex;
flex-direction: column;
}
header {
background: blueviolet;
width: 100%;
height: 80px;
}
main {
background: burlywood;
height: 500px;
}
li {
background: cyan;
margin-top: 15px;
}
li#foo {
background: darkmagenta;
}
.start + li {
background: rgb(211, 0, 130);
}
main > ul > li {
background: darkslategray;
}
footer {
background: coral;
height: 150px;
}
</style>
</head>
<body>
<header>页眉</header>
<main>
<ul>
<li class="start">11</li>
<li>22</li>
<li id="foo">33</li>
<li>
44
<ul>
<li>100</li>
<li>200</li>
<li>300</li>
<li>400</li>
<li>500</li>
</ul>
</li>
<li>55</li>
</ul>
</main>
<footer>页脚</footer>
</body>
</html>
更多相关文章
- 注册表单练习
- php 登录注册
- 选择器的使用和模块化组件思想
- php之tp6安装与扩展安装
- js完成购物车、es6模块导入问题
- 4-30用户注册界面
- 给文本注册单击事件不起作用问题记录
- LsLoader——通用移动端Web App离线化方案
- Python使用socket搭建TCP服务器(后期的客户端:GPRS模块)