WEB第二次作业

作业分析

管理员登录 2025-03-22 153942.png
管理系统 2025-03-22 162138.png

代码实现

代码1示例

<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理员登录</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        html,body{
            width: 100%;
            height: 100%;
        }
        body{
            display: flex;
            flex-direction: column;
            background: linear-gradient(135deg,#abdcff,#0396ff);
        }
        .header{
            width: 100%;
            height: 72px;
            display:flex ;
            justify-content: center;
        }
        .main{
            width: 100%;
            flex: 1;
        }
        .header .content{
            width: 1200px;
            height: 72px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .header .content a{
            color: white;
            text-decoration: none;
        }
        .header .content img{
            width: 100px;
            height: 30px;
        }
        .header .content a:hover{
            color: #dff9fb;
            font-size: 18px;
            font-weight: 600;
        }
        .main{
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .login-box{
            width: 400px;
            height: 330px;
            background-color: rgba(255,255,255,0.8);
            border-radius: 8px;
            box-shadow: #888 10px 10px 20px;
        }
        .header{
            width: 100%;
            height: 50px;
            line-height: 50px;
            text-align: center;
            font-size: 18px;
            letter-spacing: 3px;
        }
        .login{
            height: 270px;
            display: flex;
            flex-direction: column;
            justify-content: space-evenly;
        }
        .login p{
            height: 40px;
            /* background-color: orange; */
            display: flex;
            justify-content: space-evenly;
            align-items: center;
        }
        .login p input{
            width: 260px;
            height: 32px;
        }
        .login p button{
            outline: none;
            border: none;
            width: 300px;
            height: 32px;
            border-radius: 16px;
            background-color: #4872f6;
            color: white;
        }
        .login p button:hover{
            background-color: #143bbd;
            font-weight: 600;
        }
    </style>
</head>
<body>
    <div class="header">
        <div class="content">
            <img src="./images/logo.png" alt="">
            <a href="#">去登录</a>
        </div>
    </div>
    <div class="main">
        <div class="login-box">
            <div class="header">
                管理员登录
            </div>
            <div class="login">
                <p>
                    <label for="zhanghao">账号:</label>
                    <input type="text" name="zhanghao" 
                    id="zhanghao" placeholder="请输入账号">
                </p>
                <p>
                    <label for="mima">密码:</label>
                    <input type="password" name="mima"
                    id="mima" placeholder="请输入密码">
                </p>
                <p>
                    <button>登录</button>
                </p>
            </div>
        </div>
    </div>
</body>
</html>

代码2示例

<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理系统页面</title>
    <link rel="stylesheet" href="./css/style.css">
    <link rel="stylesheet" href="./css/demo02.css">
</head>

<body>
    <!-- 左侧导航栏 -->
    <div class="left-nav">
        <ul>
            <li>首页</li>
            <li>人员管理</li>
            <li>系统管理</li>
            <li>日志管理</li>
        </ul>
    </div>
    
    <div class="right-content">
       
        <div class="right-top">
            <h1>管理系统</h1>
        </div>
      
        <div class="right-middle">
            <p>这里是中间内容区域,您可以根据实际需求添加具体的管理功能展示。</p>
        </div>
        <div class="right-bottom">
            <p>版权所有 &copy; 2024 管理系统</p>
        </div>
    </div>
</body>

</html>

代码2样式示例

body {
    display: flex;
    background: rgba(135deg,#abdcff,#0396ff);
}

.left-nav {
    width: 200px;
    background-color: #6d7991;
    color:aliceblue;
    padding-top: 20px;
}

.left-nav ul {
    list-style-type: none;
    padding: 0;
}

.left-nav ul li {
    padding: 15px 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.left-nav ul li:hover {
    background-color: #45455d;
}

.right-content {
    flex: 1;
    color: aliceblue;
    display: flex;
    flex-direction: column;
    background-color: #2B2F3B;
}

.right-top {
    background-color: #30364a;
    padding: 20px;
    border-bottom: 1px solid #30364a;
}

.right-middle {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.right-bottom {
    background-color:  #30364a;
    padding: 10px;
    border-top: 1px solid  #30364a;
    text-align: center;
}
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 一.后台管理系统主页 作业分析 本次使用html标签编写如下效果 代码实现 以下为css样式 二.管理员登录页面 ...
    雾权阅读 23评论 0 0
  • 作业标题 项目任务:使用表格的方式,完成网页效果提示:一行6列的表格,没有边框 图片示例 网页代码 使用VScod...
    MoonArchive阅读 33评论 0 1
  • 作业分析 使用html标签实现点击图片跳转到相应网页 代码实现 个人总结 此代码多加了一个 标签,内容不算复杂,...
    马永跃阅读 59评论 0 0
  • 作业分析 本次使用table表格标签编写如下效果 代码实现 个人总结 对于图片的缩放有待研究,CSS语言也需要深究
    繪灮阅读 45评论 0 0
  • 本次表格插入超链接效果如下 代码实现 个人总结 超链接插入时的代码格式问题以及插入的地方与图片关系
    eeb48678a138阅读 49评论 0 1