forked from MorFansLab/LiteWebChat_Frame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchat_example.html
214 lines (181 loc) · 9.96 KB
/
chat_example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>LiteChat_Frame(轻聊天气泡框架)</title>
<link rel="stylesheet" type="text/css" href="./litewebchat.min.css" />
</head>
<style>
html,body{
height: 100%;
margin: 0;
padding: 0;
}
</style>
<body>
<!-- 主容器 -->
<div class="lite-chatbox">
<!-- cleft 左 -->
<div class="cleft cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/A.jpg" />
<span class="name">chenjunyu19</span>
<span class="content">这是什么什么鬼?</span>
</div>
<!-- cright 右 -->
<div class="cright cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/B.jpg" />
<span class="name">SuperPaxxs</span>
<span class="content">LiteChat_Frame(轻聊天气泡框架),一个贼简洁 <del>(简单)</del> 、美观、易用的 HTML 聊天界面框架</span>
</div>
<div class="cright cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/B.jpg" />
<span class="name">SuperPaxxs</span>
<span class="content">它简洁而不简单,能使你开发聊天界面更快速</span>
</div>
<div class="cleft cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/A.jpg" />
<span class="name">chenjunyu19</span>
<span class="content">直接说,气泡是谁的?</span>
</div>
<div class="cright cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/B.jpg" />
<span class="name">SuperPaxxs</span>
<span class="content">好吧,气泡css来自 <a href="http://i.intas.cn/" target="_blank">Haswikr的Blog</a> 的机器人气泡,我给白色的加了点边框 😝 </span>
</div>
<div class="cleft cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/H.jpg" />
<span class="name"><span class="htitle admin">admin</span>Haswikr</span>
<span class="content">当初调色煞费苦心</span>
</div>
<div class="cleft cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/O.jpg" />
<span class="name"><span class="htitle owner">owner</span>Sonui</span>
<span class="content">这设计真棒</span>
</div>
<div class="cleft cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/A.jpg" />
<span class="name"><span class="htitle">menber123456789789</span>chenjunyu19</span>
<span class="content">那咋用啊?</span>
</div>
<div class="cright cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/B.jpg" />
<span class="name">SuperPaxxs</span>
<span class="content">
<del>诶哟少年你找对人了</del><br><br>
如果只是使用,那非常简单。<br>
<h2>使用指北</h2>
1.引用css: litechat.css<br><br>
<link type="text/css" href="//lab.morfans.cn/LiteWebChat_Frame/litewebchat.css" rel="stylesheet" />
<br>或<br>
<link type="text/css" href="//lab.morfans.cn/LiteWebChat_Frame/litewebchat.min.css" rel="stylesheet" /><br><br>
2.创建一个 DIV ,用来容纳聊天对话,目的是不让 css 干扰页面其他内容:<br><br>
<div class="lite-chatbox"> <br>
...<br>
</div><br><br>
话说你就不会看下源码吗...<b>楼下就是特性演示</b>
</span>
</div>
<div class="tips">
<span>Chenjunyu19 退出了聊天室并撩了你一把</span>
</div>
<div class="cleft cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/A.jpg" />
<span class="name">空消息测试1</span>
<span class="content"></span>
</div>
<div class="cright cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/B.jpg" />
<span class="name">空消息测试2</span>
<span class="content"> </span>
</div>
<div class="cleft cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/A.jpg" />
<span class="name">chenjunyu19</span>
<span class="content">注意,上面两条空消息的消息内容代码不一样</span>
</div>
<div class="cright cmsg">
<img class="headIcon" ondragstart="return false;" oncontextmenu="return false;" src="./img/B.jpg" />
<span class="name">SuperPaxxs</span>
<span class="content">头像换成方形请去掉 radius </span>
</div>
<div class="cleft cmsg">
<img class="headIcon" ondragstart="return false;" oncontextmenu="return false;" src="./img/A.jpg" />
<span class="name">chenjunyu19</span>
<span class="content">我是左边的方形头像</span>
</div>
<div class="cright cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/B.jpg" />
<span class="name">图片消息</span>
<span class="content"><img src="./img/img2.png"></span>
</div>
<div class="cleft cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/A.jpg" />
<span class="name">图片消息2</span>
<span class="content"><img src="./img/img.png"><br>
图片带文字是可以的 <del>(废话)</del></span>
</div>
<div class="cright cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/B.jpg" />
<span class="name">右边长消息</span>
<span class="content">我的消息真的超级长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长长欸</span>
</div>
<div class="cleft cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/A.jpg" />
<span class="name">左边长消息</span>
<span class="content">这么巧鸭,我的也超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超超级长的欸</span>
</div>
<div class="tips">
<span class="tips-danger">系统消息:左/右边长消息被管理员批判一番……</span>
</div>
<div class="tips">
<span>系统消息:normal</span>
</div>
<div class="tips">
<span class="tips-primary">系统消息:primary</span>
</div>
<div class="tips">
<span class="tips-success">系统消息:success</span>
</div>
<div class="tips">
<span class="tips-info">系统消息:info</span>
</div>
<div class="tips">
<span class="tips-warning">系统消息:warning</span>
</div>
<div class="tips">
<span class="tips-danger">系统消息:danger</span>
</div>
<div class="cright cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/B.jpg" />
<span class="name">带有超链接的消息测试</span>
<span class="content">当然是可以有超链接的。例子在这里:<br><a href="http://morfans.cn" target="_blank">你敢点我吗</a> ← 戳这里</span>
</div>
<div class="cleft cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/A.jpg" />
<span class="name">全符号测试</span>
<span class="content">。,;?:!‘’“”@ˆ.,;?:!'"〝〞﹫ˇ</span>
</div>
<div class="cleft cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/A.jpg" />
<span class="name">全emoji测试</span>
<span class="content">😀😝🐂🍺</span>
</div>
<div class="cright cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/B.jpg" />
<span class="name"> </span>
<span class="content">当无昵时候需要 &nbsp; 填充</span>
</div>
<div class="cright cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/B.jpg" />
<span class="name">SuperPaxxs</span>
<span class="content">换行用 <br> ,HTML 你懂的..</span>
</div>
<div class="cleft cmsg">
<img class="headIcon radius" ondragstart="return false;" oncontextmenu="return false;" src="./img/A.jpg" />
<span class="name">chenjunyu19</span>
<span class="content">以上就是全部的特性,以后有空再更</span>
</div>
</body>
</html>