1314CG
  • 首页
  • 全部资源
    • 场景&影视
    • 角色
    • 美宣插画
    • 三维软件
    • 概念设计
    • 肖像绘画
    • 特殊资源-未直接展示
    • 正在众筹
  • 购买教程/问题
    • 注册登陆&资源购买
    • 常见问题(必看)
  • 平台公告
    • 功能更新
    • 资源更新
  • 关于我们
    • 联系我们
    • 我要推广
  • 关于用户
    • 用户评价
    • 用户协议
登录
  1. 首页
  2. 留言板

留言板

2026-02-12 19

/* 注意:去掉了 * {margin:0} 等全局样式,防止破坏你网站原本的样式 */

.embedded-gb-container { width: 100%; max-width: 600px; margin: 20px auto; background: #ffffff; padding: 30px; border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; }

.embedded-gb-container h2 { text-align: center; color: #1a1a1a; margin-bottom: 8px; font-weight: 600; }

.embedded-gb-container .subtitle { text-align: center; color: #6c757d; font-size: 14px; margin-bottom: 25px; }

.embedded-gb-container .user-info { padding: 14px 20px; background-color: #e8f5e9; border-radius: 8px; border-left: 4px solid #28a745; margin-bottom: 25px; font-weight: 500; color: #28a745; }

.embedded-gb-container .rating { display: flex; justify-content: center; align-items: center; gap: 4px; margin-bottom: 25px; font-size: 32px; user-select: none; }

.embedded-gb-container .rating span { color: #ddd; cursor: pointer; transition: color 0.2s ease; }

.embedded-gb-container .rating span.filled { color: #ffc107; text-shadow: 0 0 4px rgba(255, 193, 7, 0.4); }

.embedded-gb-container .emoji-container { display: flex; justify-content: center; gap: 10px; margin: 20px 0; padding: 15px; background-color: #f1f3f5; border-radius: 10px; flex-wrap: wrap; }

.embedded-gb-container .emoji-btn { background: #ffffff; border: 1px solid #dee2e6; border-radius: 8px; width: 44px; height: 44px; font-size: 20px; cursor: pointer; transition: all 0.2s; }

.embedded-gb-container .emoji-btn:hover { background-color: #e9ecef; transform: translateY(-2px); }

.embedded-gb-container textarea { width: 100%; padding: 16px; border: 2px solid #e9ecef; border-radius: 10px; resize: vertical; height: 120px; font-size: 15px; outline: none; }

.embedded-gb-container textarea:focus { border-color: #007bff; }

.embedded-gb-container .submit-btn { display: block; width: 100%; padding: 14px; background-color: #007bff; color: white; font-size: 16px; border: none; border-radius: 8px; cursor: pointer; margin-top: 10px; }

.embedded-gb-container .submit-btn:hover { background-color: #0056b3; }

.embedded-gb-container .messages { margin-top: 30px; padding-top: 20px; border-top: 1px solid #eee; }

.embedded-gb-container .message-card { background: #fdfdfd; padding: 18px; border-radius: 10px; margin-bottom: 12px; border: 1px solid #eee; }

留言板

欢迎留下你的足迹

👤 欢迎你,游客!
★
★
★
★
★






// 配置:修改这里的用户名 let currentUsername = "游客"; let currentRating = 0; let stars = null;

// 页面加载完成后初始化 document.addEventListener('DOMContentLoaded', function() { initGuestbook(); });

function initGuestbook() { const usernameSpan = document.getElementById('username'); const starRating = document.getElementById('star-rating'); const messageList = document.getElementById('message-list');

// 显示用户名 if (usernameSpan) usernameSpan.textContent = currentUsername;

// 初始化评分 if (starRating) { stars = starRating.querySelectorAll('span[data-value]'); stars.forEach(star => { star.addEventListener('click', function() { currentRating = this.getAttribute('data-value'); stars.forEach(s => { s.classList.toggle('filled', parseInt(s.getAttribute('data-value')) s.classList.remove('filled')); }

// 渲染留言 function renderMessages(messages, container) { if (!container) return; container.innerHTML = '';

messages.forEach(msg => { const card = document.createElement('div'); card.className = 'message-card'; card.innerHTML = `

${msg.username} ${msg.time}
评分: ${msg.rating > 0 ? '★'.repeat(msg.rating) + '☆'.repeat(5-msg.rating) : '未评分'}

${msg.content}

`; container.appendChild(card); }); }

// 存储操作 function getMessages() { return JSON.parse(localStorage.getItem('guestbook_messages') || '[]'); }

function saveMessages(messages) { localStorage.setItem('guestbook_messages', JSON.stringify(messages)); }

function loadMessages(container) { renderMessages(getMessages(), container); }

最新发布

【李大山】人体造型系统课 2026年(3月结)

【粉帮老大】3d辅助插画十期2026年(3月结)

【进击的MT】人体头像绘画基础班二期 2025年(12月结)

【蚂蚁八手王】角色进阶班14期 2024年(4月结)

1314CG

专注分享画CG教程视频场景概念设计角色概念设计影视概念设计二次元美宣插画课程资源的网站。独家整理优质精品稀有资源。全部内容站长亲自筛选,节省您找的时间和精力。

快速导航

  • 用户协议
  • 用户评价
  • 我要推广

关于本站

  • 功能更新
  • 资源更新

联系我们

追踪信息反馈点击此处提交
版权免责声明本站内容都是通过网络公开途径获取,如果您认为哪一篇内容侵犯了您的权益,请点击此处提交
  • 资源购买方法
  • 常见问题
  • 联系我们
  • 首页
  • 分类
  • 会员
  • 我的
1314CG