<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>基本选择器</title>
<style>
div{
color: red;
}
.cls{
color: blue;
}
#d1{
color: green;
}
#d2{
color: pink;
}
</style>
</head>
<body>
<div>div1</div>
<div class="cls">div2</div>
<div class="cls">div3</div>
<div id="d1">div4</div>
<div id="d2">div5</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>属性选择器</title>
<style>
[type]{
color: red;
}
[type=password]{
color: blue;
}
</style>
</head>
<body>
用户名:<input type="text"/> <br/>
密码:<input type="password"/> <br/>
邮箱:<input type="email"/> <br/>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>伪类选择器</title>
<style>
a{
text-decoration: none;
}
a:link{
color: black;
}
a:visited{
color: blue;
}
a:hover{
color: red;
}
a:active{
color: yellow;
}
</style>
</head>
<body>
<a href="https://www.baidu.com" target="_blank">百度一下</a>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>组合选择器</title>
<style>
.center li{
color: red;
}
span,p{
color: blue;
}
</style>
</head>
<body>
<div class="top">
<ol>
<li>aa</li>
<li>bb</li>
</ol>
</div>
<div class="center">
<ol>
<li>cc</li>
<li>dd</li>
</ol>
</div>
<span>span</span> <br/>
<p>段落</p>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>边框样式演示</title>
<style>
#d1{
border-top: 5px solid black;
border-left: 5px double red;
border-right: 5px dotted blue;
border-bottom: 5px dashed pink;
width: 150px;
height: 150px;
}
#d2{
border: 5px solid red;
border-radius: 25px;
width: 150px;
height: 150px;
}
</style>
</head>
<body>
<div id="d1"></div>
<br/>
<div id="d2"></div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>文本样式演示</title>
<style>
div{
color: #ff0000;
font-family: 微软雅黑;
font-size: 25px;
text-decoration: none;
text-align: center;
line-height: 60px;
}
span{
vertical-align: 50%;
}
</style>
</head>
<body>
<div>
我是文字
</div>
<div>
我是文字
</div>
<img src="../img/wx.png" width="38px" height="38px"/>
<span>微信</span>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>表格标签演示</title>
</head>
<body>
<table width="400px" border="1px" align="center">
<thead>
<tr>
<th>姓名</th>
<th>性别</th>
<th>年龄</th>
<th>数学</th>
<th>语文</th>
</tr>
</thead>
<tbody>
<tr align="center">
<td>张三</td>
<td rowspan="2">男</td>
<td>23</td>
<td colspan="2">90</td>
</tr>
<tr align="center">
<td>李四</td>
<td>24</td>
<td>95</td>
<td>98</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="4">总分数:</td>
<td>373</td>
</tr>
</tfoot>
</table>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>样式演示</title>
<style>
body{
background: url("../img/bg.jpg");
background-repeat: repeat;
}
input{
outline: none;
}
div{
display: inline-block;
width: 100px;
}
</style>
</head>
<body>
用户名:<input type="text"/> <br/>
<div>春季</div>
<div>夏季</div>
<div>秋季</div>
<div>冬季</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>盒子模型演示</title>
<style>
.wai{
border: 1px solid red;
width: 200px;
height: 200px;
}
.nei{
border: 1px solid blue;
width: 100px;
height: 100px;
}
</style>
</head>
<body>
<div class="wai">
<div class="nei">
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>登录页面</title>
<link rel="stylesheet" href="../css/login.css"/>
</head>
<body>
<div>
<img src="../img/logo.png"/>
</div>
<div class="center">
<form action="#" method="get" autocomplete="off">
<table width="100%">
<thead>
<tr>
<th colspan="2">账 密 登 录<hr/></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<label for="username">账号</label>
</td>
<td>
<input type="text" id="username" name="username" placeholder=" 请输入账号" required/>
</td>
</tr>
<tr>
<td>
<label for="password">密码</label>
</td>
<td>
<input type="password" id="password" name="password" placeholder=" 请输入密码" required/>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2">
<button type="submit">确 定</button>
</td>
</tr>
</tfoot>
</table>
</form>
</div>
<div class="footer">
<br/><br/>
登录/注册即表示您同意
<a href="#" target="_blank">用户协议</a>
和
<a href="#" target="_blank">隐私条款</a>
<a href="#" target="_blank">忘记密码?</a>
</div>
</body>
</html>
body{
background: url("../img/bg.png");
}
.center{
background: white;
width: 40%;
margin: auto;
margin-top: 100px;
border-radius: 15px;
text-align: center;
}
thead th{
font-size: 30px;
color: orangered;
}
tbody label{
font-size: 20px;
}
tbody input{
border: 1px solid gray;
border-radius: 5px;
width: 90%;
height: 40px;
outline: none;
}
tfoot button{
border: 1px solid crimson;
border-radius: 5px;
width: 95%;
height: 40px;
background: crimson;
color: white;
font-size: 20px;
}
tr{
line-height: 60px;
}
.footer{
width: 35%;
margin: auto;
font-size: 15px;
color: gray;
}
a{
text-decoration: none;
color: blue;
}