作家排行
作家排行
雨梦博客

作家排行

3440655380
2024-06-19 / 0 评论 / 3 阅读 / 正在检测是否收录...
<!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;
            padding: 0;
            background-color: #f5f5f5;
        }
        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 20px;
            background-color: #333;
            color: white;
        }
        header a {
            color: white;
            text-decoration: none;
            margin: 0 10px;
        }
        nav {
            background-color: #444;
            padding: 10px 20px;
        }
        nav a {
            color: white;
            text-decoration: none;
            margin: 0 10px;
        }
        nav .dropdown {
            position: relative;
            display: inline-block;
        }
        nav .dropdown-content {
            display: none;
            position: absolute;
            background-color: #555;
            min-width: 160px;
            box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
        }
        nav .dropdown-content a {
            color: white;
            padding: 12px 16px;
            text-decoration: none;
            display: block;
        }
        nav .dropdown:hover .dropdown-content {
            display: block;
        }
        .author-list {
            padding: 20px;
        }
        .author {
            background-color: #fff;
            border: 2px solid #333;
            padding: 10px;
            text-align: center; /* 让内容居中 */
            margin-bottom: 10px;
            box-sizing: border-box; /* 让padding不会影响到宽度 */
            display: flex;
            align-items: center;
            justify-content: space-between; /* 水平居中并排列 */
        }
        .author img {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            margin-right: 20px;
        }
        .author-name {
            font-size: 1.2em;
        }
        .author-description {
            flex: 1; /* 自动填充剩余空间 */
            text-align: left; /* 左对齐 */
            margin-left: 20px; /* 左边距 */
        }
    </style>
</head>
<body>

<header>
    <div><a href="#"><img src="logo.png" alt="小说网"></a></div>
    <input type="text" placeholder="搜索">
    <div>
        <a href="#">注册</a> /
        <a href="#">登录</a>
    </div>
</header>

<nav>
    <a href="index.html">首页</a>
    <div class="dropdown">
        <a href="#">排行</a>
        <div class="dropdown-content">
            <a href="#">小说排行</a>
            <a href="#">作家排行</a>
        </div>
    </div>
    <a href="#">分类</a>
</nav>

<div class="author-list">
    <div class="author">
        <img src="150.webp" alt="作家1">
        <div class="author-description">
            <a href="#">作家名1</a>
            <p>这是一条介绍</p>
        </div>
    </div>
    <div class="author">
        <img src="150.webp" alt="作家2">
        <div class="author-description">
            <a href="#">作家名2</a>
            <p>这是一条介绍</p>
        </div>
    </div>
    <div class="author">
        <img src="150.webp" alt="作家3">
        <div class="author-description">
            <a href="#">作家名3</a>
            <p>这是一条介绍</p>
        </div>
    </div>
    <div class="author">
        <img src="author4.jpg" alt="作家4">
        <div class="author-description">
            <a href="#">作家名4</a>
            <p>这是一条介绍</p>
        </div>
    </div>
    <div class="author">
        <img src="author5.jpg" alt="作家5">
        <div class="author-description">
            <a href="#">作家名5</a>
            <p>这是一条介绍</p>
        </div>
    </div>
    <div class="author">
        <img src="author6.jpg" alt="作家6">
        <div class="author-description">
            <a href="#">作家名6</a>
            <p>这是一条介绍</p>
        </div>
    </div>
</div>

</body>
</html>
0

评论 (0)

取消