美化表单元素
新的伪类
- focus 元素聚焦样式
<!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>
<style>
input:focus{
outline: 3px solid #008c8c;
outline-offset: none;
color: red;
}
input{
color: blue;
}
</style>
</head>
<body>
<p>
<a tabindex="2" href="http://www.baidu.com">lorem</a>
</p>
<p>
<input type="text" tabindex="1">
</p>
<p>
<button tabindex