精美信息卡片HTML代码实现

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>信息卡片</title>
    <style>
        /* 卡片容器样式 */
        .card {
            width: 300px;
            border-radius: 12px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
            overflow: hidden;
            font-family: 'Segoe UI', sans-serif;
            background: white;
            transition: transform 0.3s ease;
            margin: 20px;
        }

        .card:hover {
            transform: translateY(-5px);
        }

        /* 卡片图片样式 */
        .card-img {
            width: 100%;
            height: 180px;
            object-fit: cover;
        }

        /* 卡片内容区域 */
        .card-content {
            padding: 20px;
        }

        /* 卡片标题 */
        .card-title {
            font-size: 1.5em;
            margin: 0 0 12px 0;
            color: #333;
        }

        /* 卡片描述文字 */
        .card-text {
            color: #666;
            font-size: 0.9em;
            line-height: 1.6;
            margin-bottom: 15px;
        }

        /* 卡片按钮样式 */
        .card-button {
            display: inline-block;
            padding: 8px 20px;
            background: linear-gradient(45deg, #4CAF50, #45a049);
            color: white;
            text-decoration: none;
            border-radius: 25px;
            font-weight: 500;
            transition: background 0.3s ease;
        }

        .card-button:hover {
            background: linear-gradient(45deg, #45a049, #4CAF50);
        }
    </style>
</head>
<body>
    <div class="card">
        <img src="https://picsum.photos/300/180" alt="示例图片" class="card-img">
        <div class="card-content">
            <h3 class="card-title">特色服务</h3>
            <p class="card-text">
                我们提供专业的解决方案,帮助您快速实现业务目标。从战略规划到技术实施,全程为您保驾护航。
            </p>
            <a href="#" class="card-button">了解更多</a>
        </div>
    </div>
</body>
</html>

📚目录

评论 (0)

×

暂无评论,快来发表第一条评论吧

请输入验证码

×
验证码图片

©2025 - 菜鬼自学网 - 梦想不大创造神话~