批改状态:合格
老师批语:总结的不错
<!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>状态伪类</title><link rel="stylesheet" href="1021-01css.css" /><style>/**------------------------------------------------------------------------* ! 状态伪类*------------------------------------------------------------------------**/fieldset {display: inline-grid;gap: 1em;border-radius: 10px;padding: 1em 2em;color: #18201e;background: linear-gradient(to left top, #097865);}fieldset legend {text-align: center;}fieldset input {padding: 5px;border: none;border-bottom: #18201e 1px solid;}/*! 状态伪类? 匹配获取焦点 input:focus*/fieldset input:focus {background-color: lightgreen;transition: 0.45s;}input[type="checkbox"]:checked + label {color: red;}/*? 当鼠标悬停在某个元素上的效果*/button {border: none;background: lightgreen;color: white;padding: 5px 10px;letter-spacing: 1em;}button:hover {cursor: pointer;border: none;background: #a3ee90;color: #706f6f;padding: 5px 10px;letter-spacing: 1em;opacity: 0.85;}/* 被禁用元素 */fieldset :disabled {background: #3bcca8;color: azure;}/**========================================================================* ! 盒模型* ? 属性有 width, height, padding, margin, border, box-sizing*========================================================================**//* 四值方法 上,右,下,左 */padding: 5px 10px 15px 20px;/* 三值方法 上 ,左右,下*/padding: 5px 10px 15px;/* 双值 上下 左右 */padding: 5px 10px;/* 单值 上下左右全相等 */padding: 10px;/* 三值,双值记忆方法:只要出现在第二个参数位置上,就必然代表左右 *//* margin 和 padding 是一样的,border 是不存在以上的简化缩写的,border 是可见的*/.box {width: 300px;height: 260px;border: #097865 double 5px;text-align: center;padding: 20px 10px 12px 15px;margin: 8px 12px 13px 15px;box-sizing: border-box;}</style></head><body><!-- ! 状态伪类 --><form action=""><fieldset><legend>用户注册</legend><inputtype="text"id="username"name="username"placeholder="用户名"requiredautofocus/><inputtype="email"id="useremail"name="useremail"placeholder="电子邮箱"requireddisabled/><inputtype="password"id="userpass"name="userpass"placeholder="用户密码"required/><!-- 默认被选中 --><input type="checkbox" id="rem" name="rem" checked /><label for="rem">记住我</label><button type="submit">提交</button></fieldset></form><!-- ! 盒模型 --><div class="box">盒模型</div></body></html>
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号