博主信息
博文 35
粉丝 0
评论 0
访问量 32831
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
0704作业2
锋芒天下的博客
原创
707人浏览过

<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <title>作业2</title>

   <style>

       *{
           margin: 0;
           padding: 0;
       }

       #box{
           width: 500px;
           /*height: 700px;*/
           /*border: 1px solid red;*/
           margin: 200px auto;
       }
       #box ul{
           margin: 50px auto;
           padding: 0 5px;
       }
       #box ul li{
           list-style: none;
           display: inline-block;
           width: 40px;
           height: 40px;
           margin: 0 auto;
           /*background: green;*/
           text-align: center;
           line-height: 40px;
           border-radius: 50%;
           border: 2px solid #000000;
           box-shadow: 5px 5px 10px #666666;
       }
       /*伪类选择器*/

       /*ul下第一个子元素,first-child*/
       /*ul :first-child{*/
       /*    background-color: darkred;*/
       /*}*/

       /*ul下最后一个子元素,last-child*/
       /*ul :last-child{*/
       /*    background: yellow;*/
       /*}*/

       /*ul下的偶数子元素,ul :nth-child(2n或者even)*/
       ul :nth-child(even){
           /*background: yellow;*/
       }
       /*ul下的奇数子元素,ul :nth-child(2n-1或者odd)*/
       ul :nth-child(odd){
           /*background: green;*/
       }

       /*ul下倒数第二个子元素选中*/
       ul :nth-last-child(2){
           /*background: coral;*/
       }

       ul li:nth-of-type(4){
           background: darkred;
       }

       /*表单样式*/

       #from{
           width: 500px;
           height: 500px;
           border: 1px solid #666666;
           margin: 0 auto;
       }

           /*获取标点焦点*/
       form :focus{
           background: #ccc;
       }
   </style>


</head>
<body>


<div id="box">

   <ul>
       <li>1</li>
       <li>2</li>
       <li>3</li>
       <li>4</li>
       <li>5</li>
       <li>6</li>
       <li>7</li>
       <li>8</li>
       <li>9</li>
       <li>10</li>
   </ul>
</div>

<div id="from">

   <!-- 演示表单选择器 -->
   <form action="">
       <p>
           <label for="email">邮箱:</label>
           <input type="email" id="email">
       </p>



       <p>
           <label for="password">密码:</label>
           <input type="password" id="password">
       </p>

       <p>
           <input type="radio" id="week" name="save" value="7" checked><label for="week">保存一周</label>
           <input type="radio" id="month" name="save" value="30"><label for="month">保存一月</label>
       </p>

       <p>
           <button>登录</button>
       </p>

   </form>



</div>

</body>
</html>

批改状态:合格

老师批语:
本博文版权归博主所有,转载请注明地址!如有侵权、违法,请联系admin@php.cn举报处理!
全部评论 文明上网理性发言,请遵守新闻评论服务协议
0条评论
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号

  • 登录PHP中文网,和优秀的人一起学习!
    全站2000+教程免费学