svg+css布局实现绿色学习类app的个人中心我的ui页面代码

代码语言:html

所属分类:布局界面

代码描述:svg+css布局实现绿色学习类app的个人中心我的ui页面代码

代码标签: svg css 布局 绿色 学习 app 个人中心 我的 ui 页面 代码

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户中心</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            background-color: #f4f4f4;
            color: #333;
        }

        .container {
            max-width: 400px; /* 模拟手机宽度 */
            margin: 0 auto;
            background-color: #fff;
            min-height: 100vh;
            box-shadow: 0 0 10px rgba(0,0,0,0.1);
        }

        /* 顶部会员区域 */
        .profile-header {
            background: linear-gradient(to right, #4CAF50, #8BC34A); /* 绿色渐变 */
            padding: 20px;
            color: #fff;
            display: flex;
            flex-direction: column;
            align-items: center;
            position: relative;
            overflow: hidden; /* 隐藏超出部分的卡通形象 */
            border-bottom-left-radius: 15px;
            border-bottom-right-radius: 15px;
        }

        .profile-info {
            display: flex;
            align-items: center;
            width: 100%;
            justify-content: flex-start;
            margin-bottom: 20px;
        }

        .avatar {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background-color: #eee; /* 占位符 */
            margin-right: 15px;
            overflow: hidden;
            border: 2px solid #fff;
        }

        .avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .user-details h3 {
            margin: 0;
            font-size: 1.2em;
        }

        .user-details p {
            margin: 5px 0 0;
            font-size: 0.9em;
            opacity: 0.8;
        }

        .header-bg-image {
            position: absolute;
            right: 0;
            bottom: 0;
            width: 150px; /* 调整大小 */
            height: 150px; /* 调整大小 */
            background-size: contain;
            background-repeat: no-repeat;
            background-position: bottom right;
            /* 假设这是一个SVG图像,你可以直接嵌入或用背景图 */
            /* background-image: url('path/to/your/cartoon-character.svg'); */
            /* 或者直接嵌入SVG */
        }

        .membership-card {
            background-color: rgba(255, 255, 255, 0.2);
            border-radius: 8px;
            padding: 10px 15px;
            margin-top: 10px;
            width: calc(100% - 30px);
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.9em;
        }

        .membership-stats {
            display: flex;
            justify-content: space-around;
            width: 100%;
            margin-top: 20px;
            text-align: center;
        }

        .membership-stats div {
            flex: 1;
            font-size: 0.9em;
        }

        .membership-stats div strong {
            display: block;
            font-size: 1.4em;
            margin-bottom: 5px;
        }

        /* 我的学习区域 */
        .section-card {
           .........完整代码请登录后点击上方下载按钮下载查看

网友评论0