唯美留言板HTML+CSS完整代码(简约手写风格)

唯美留言板代码唯美留言板代码 2026-01-04
唯美留言板HTML+CSS完整代码(简约手写风格)

唯美留言板HTML+CSS完整代码(简约手写风格)

这种风格模仿微信聊天或手写便签,背景通常采用暖色调或淡雅纹理,字体选用衬线体或手写体,营造温馨氛围。

“愿你的世界里,
星光满载,初心不改。”

点击查看核心代码
<!DOCTYPE html>
<html>
<head>
<style>
    body { background: #f5f5f5; font-family: 'PingFang SC', sans-serif; display: flex; justify-content: center; align-items: center; min-height: 100vh; }
    .msg-board { width: 350px; background: #fffdf5; padding: 25px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border: 1px solid #e8d5c2; position: relative; }
    .msg-board::before { content: ''; position: absolute; top: 10px; left: 10px; right: 10px; bottom: 10px; border: 1px dashed #d4c5a9; pointer-events: none; border-radius: 10px; }
    .title { text-align: center; color: #8b5a2b; font-size: 24px; margin-bottom: 20px; font-family: 'STKaiti', serif; letter-spacing: 2px; }
    .input-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
    textarea { resize: none; height: 60px; padding: 10px; border: 1px solid #e0d0b0; border-radius: 8px; background: #fff; font-family: 'STKaiti', serif; font-size: 16px; outline: none; }
    textarea:focus { border-color: #a8d8ea; box-shadow: 0 0 5px rgba(168, 216, 234, 0.5); }
    .btn { background: #8b5a2b; color: #fff; border: none; padding: 10px; border-radius: 8px; cursor: pointer; transition: 0.3s; font-weight: bold; }
    .btn:hover { background: #6b4423; transform: translateY(-2px); }
    .list { max-height: 300px; overflow-y: auto; margin-top: 10px; }
    .item { background: #fff; padding: 10px; margin-bottom: 10px; border-radius: 8px; border-left: 3px solid #d4c5a9; font-size: 14px; color: #666; animation: fadeIn 0.5s ease; }
    .time { font-size: 10px; color: #999; margin-top: 5px; display: block; text-align: right; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
    ::-webkit-scrollbar { width: 6px; }
    ::-webkit-scrollbar-thumb { background: #d4c5a9; border-radius: 3px; }
</style>
</head>
<body>
<div class="msg-board">
    <div class="title">唯 · 留言</div>
    <div class="input-group">
        <textarea id="msgInput" placeholder="在此输入内容..."></textarea>
        <button class="btn" onclick="addMessage()">留下印记</button>
    </div>
    <div class="list" id="msgList"></div>
</div>
<script>
    function addMessage() {
        var input = document.getElementById('msgInput');
        var list = document.getElementById('msgList');
        if (!input.value.trim()) { alert('请填写内容'); return; }
        var div = document.createElement('div');
        div.className = 'item';
        var date = new Date();
        var timeStr = date.getFullYear() + '-' + (date.getMonth()+1) + '-' + date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes();
        div.innerHTML = input.value + '<span class="time">' + timeStr + '</span>';
        list.insertBefore(div, list.firstChild);
        input.value = '';
    }
</script>
</body>
</html>
        
精选评论
  • 赤色月光:106.89.170.234
    補記仲係讀書時候睇嘅經典之作烚下烚下  唯美留言板HTML+CSS完整代码(简约手写风格)
  • 环游发光睡裤:139.202.120.180
    这季尾收的太工整唯美留言板HTML+CSS完整代码(简约手写风格)没有弄大事件真好奇第6季怎么开头 唯美留言板HTML+CSS完整代码(简约手写风格)
  • Phoebe的情书:121.76.190.87
    这种片子得是阅碟颇多的人才能看懂 搞笑啊 哈哈  唯美留言板HTML+CSS完整代码(简约手写风格)
  • 惟勤Heart:222.83.163.64
    拍得很好看浓墨重彩的表现风格 疤面煞星不知道是不是从这片来的灵感写一个人如何走向灵魂的深渊 最好的故事感觉没有讲完唯美留言板HTML+CSS完整代码(简约手写风格)可能是觉得无论是谁杀死谁都不够高级吧 我倒是喜欢他不被杀死一个不死的恶魂就很带劲  唯美留言板HTML+CSS完整代码(简约手写风格)
  • 捕雨:36.58.144.126
    董永太太太丑了 杨子好好的商人干嘛非要出来演戏辣眼睛 他俩算是公费谈恋爱黄圣依好美啊  唯美留言板HTML+CSS完整代码(简约手写风格)
🆕 New