html在线聊天界面模板,一款带气泡对话框的HTML5聊天应用界面模板

CSS

语言:

CSSSCSS

确定

@import url('https://fonts.googleapis.com/css?family=Roboto:100,400,700');

html,

body {

height: 100%;

margin: 0;

font-family: 'Roboto', sans-serif;

font-weight: 100;

}

body {

display: flex;

justify-content: center;

align-items: center;

}

#container {

width: 80%;

height: 80%;

display: flex;

box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);

min-width: 600px;

}

aside,

#main {

flex-grow: 1;

height: 100%;

min-width: 300px;

}

aside {

background-color: #2F373F;

}

#main {

background-color: #E7EDED;

}

aside header {

background-color: #343

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是一个简单的暗色模式的HTML在线聊天界面模板,你可以根据自己的需求进行修改和定制。 ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Dark Mode Chat Template</title> <style> body { background-color: #1c1c1c; color: #fff; font-family: Arial, sans-serif; font-size: 16px; line-height: 1.5; } .chat-container { max-width: 600px; margin: 0 auto; padding: 20px; } .chat-message { display: flex; align-items: center; margin-bottom: 20px; } .chat-message img { width: 50px; height: 50px; border-radius: 50%; margin-right: 10px; } .chat-message .message-bubble { background-color: #333; padding: 10px; border-radius: 10px; } .chat-message .message-bubble p { margin: 0; } .chat-message .message-bubble .timestamp { font-size: 12px; color: #ccc; margin-top: 5px; text-align: right; } </style> </head> <body> <div class="chat-container"> <div class="chat-message"> <img src="https://via.placeholder.com/50" alt="User Avatar"> <div class="message-bubble"> <p>Hello, how can I help you?</p> <div class="timestamp">12:00 PM</div> </div> </div> <div class="chat-message"> <div class="message-bubble"> <p>Hi, I'm having trouble with my account.</p> <div class="timestamp">12:05 PM</div> </div> <img src="https://via.placeholder.com/50" alt="User Avatar"> </div> <div class="chat-message"> <img src="https://via.placeholder.com/50" alt="User Avatar"> <div class="message-bubble"> <p>What seems to be the problem?</p> <div class="timestamp">12:10 PM</div> </div> </div> </div> </body> </html> ``` 在这个模板中,我们使用了以下样式设置: - `background-color`和`color`属性分别设置了页面的背景色和字体颜色。 - `.chat-container`类设置了聊天容器的最大宽度和内边距。 - `.chat-message`类设置了聊天消息的布局和外边距。 - `.chat-message img`类设置了用户头像的大小、圆角和右边距。 - `.chat-message .message-bubble`类设置了聊天消息气泡的背景色、内边距和圆角。 - `.chat-message .message-bubble p`类设置了聊天消息的文本样式和外边距。 - `.chat-message .message-bubble .timestamp`类设置了聊天消息时间戳的字体大小、颜色、上边距和对齐方式。 你可以根据自己的需求进行修改和添加样式。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值