js+css布局实现手机端车险方案多家智能报价ui效果代码

代码语言:html

所属分类:布局界面

代码描述:js+css布局实现手机端车险方案多家智能报价ui效果代码

代码标签: js css 布局 手机端 车险 多家 方案 智能 报价 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, maximum-scale=1.0, user-scalable=no">
    <title>车险智能报价</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
            padding-bottom: 80px;
        }

        .container {
            max-width: 500px;
            margin: 0 auto;
        }

        .header {
            text-align: center;
            color: white;
            margin-bottom: 24px;
            padding-top: 10px;
        }

        .header h1 {
            font-size: 26px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .header p {
            font-size: 14px;
            opacity: 0.9;
        }

        .card {
            background: white;
            border-radius: 16px;
            padding: 20px;
            margin-bottom: 16px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        }

        .card-title {
            font-size: 18px;
            font-weight: 600;
            color: #333;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
        }

        .card-title::before {
            content: '';
            width: 4px;
            height: 18px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            margin-right: 10px;
            border-radius: 2px;
        }

        .insurance-item {
            border-bottom: 1px solid #f0f0f0;
            padding: 16px 0;
        }

        .insurance-item:last-child {
            border-bottom: none;
        }

        .insurance-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }

        .insurance-name {
            font-size: 16px;
            color: #333;
            font-weight: 500;
        }

        .insurance-tag {
            font-size: 12px;
            padding: 2px 8px;
            border-radius: 4px;
            background: #fff3e0;
            color: #ff9800;
        }

        .insurance-tag.required {
            background: #ffebee;
            color: #f44336;
        }

        .switch-wrapper {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 12px;
        }

        .switch-label {
            font-size: 14px;
            color: #666;
        }

        .switch {
            position: relative;
            width: 50px;
            height: 28px;
        }

        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .3s;
            border-radius: 28px;
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 22px;
            width: 22px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: .3s;
            border-radius: 50%;
        }

        input:checked + .slider {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }

        input:checked + .slider:before {
            transform: translateX(22px);
        }

        .amount-selector {
            display: none;
            margin-top: 12px;
        }

        .amount-selector.active {
            display: block;
        }

        .amount-label {
            font-size: 13px;
            color: #666;
            margin-bottom: 8px;
        }

        .amount-options {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
        }

        .amount-option {
            padding: 10px;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            text-align: center;
            font-size: 14px;
            color: #666;
            cursor: pointer;
            transition: all 0.3s;
        }

        .amount-option.selected {
            border-color: #667eea;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            font-weight: 500;
        }

        .quote-btn {
            position: fixed;
            bottom: 20px;
            left: 20px;
            right: 20px;
            max-width: 500px.........完整代码请登录后点击上方下载按钮下载查看

网友评论0