以下是一个简单的网页 UI 设计,用于介绍一个人物,并带有互动动效。

<!DOCTYPE html>
<html>
<head>
    <title>人物介绍</title>
    <style>
        body {
            background: #f2f2f2;
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
        }

        .container {
            width: 800px;
            margin: 50px auto;
            background: #fff;
            padding: 20px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }

        h1 {
            text-align: center;
            color: #333;
        }

        .profile {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-top: 30px;
        }

        .profile-img {
            width: 200px;
            height: 200px;
            border-radius: 50%;
            overflow: hidden;
        }

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

        .profile-details {
            margin-left: 20px;
        }

        .profile-details h2 {
            margin: 0;
            color: #333;
        }

        .profile-details p {
            margin: 10px 0;
            color: #777;
            line-height: 1.5;
        }

        .btn {
            display: inline-block;
            padding: 10px 20px;
            background: #333;
            color: #fff;
            text-decoration: none;
            border-radius: 4px;
            transition: background 0.3s ease;
        }

        .btn:hover {
            background: #555;
        }
    </style>
</head>
<body>
    <div class='container'>
        <h1>人物介绍</h1>
        <div class='profile'>
            <div class='profile-img'>
                <img src='profile.jpg' alt='Profile Image'>
            </div>
            <div class='profile-details'>
                <h2>张三</h2>
                <p>年龄:25岁</p>
                <p>职业:设计师</p>
                <p>兴趣爱好:绘画、旅行、摄影</p>
                <a href='#' class='btn'>了解更多</a>
            </div>
        </div>
    </div>
</body>
</html>

请将上述代码保存为一个 HTML 文件,并将 profile.jpg 文件与 HTML 文件放在同一目录下。你可以将 profile.jpg 替换为实际的人物头像图片。

这个网页的设计包括一个居中的容器,其中包含一个人物的头像、姓名、年龄、职业、兴趣爱好和一个'了解更多'的按钮。你可以根据需要进行修改和扩展。

交互式人物介绍网页设计 - HTML代码示例

原文地址: https://www.cveoy.top/t/topic/pE4Q 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录