chattest.html 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>聊天</title>
  7. <style>
  8. body {
  9. padding: 0;
  10. margin: 0;
  11. font-family: -apple-system;
  12. font-family: "-apple-system", "Helvetica Neue", "Roboto", "Segoe UI", sans-serif;
  13. }
  14. .chat-title {
  15. height: 50px;
  16. width: 100%;
  17. text-align: center;
  18. padding-top: 15px;
  19. padding-bottom: 15px;
  20. background-color: #ffffff;
  21. border-bottom: 1px solid #F1F1F1;
  22. }
  23. .chat-title span {
  24. line-height: 50px;
  25. }
  26. .chat-content {
  27. background-color: #ebebeb;
  28. overflow: auto;
  29. position: absolute;
  30. bottom: 156px;
  31. top: 85px;
  32. left: 0px;
  33. width: 100%;
  34. }
  35. .chat-bottom-area {
  36. height: 155px;
  37. overflow: hidden;
  38. border-top: 1px solid #F1F1F1;
  39. display: block;
  40. position: absolute;
  41. bottom: 0px;
  42. background: #ffffff;
  43. width: 100%;
  44. z-index: 100;
  45. }
  46. .chat-bottom-area-tool {
  47. position: relative;
  48. padding: 0 8px;
  49. height: 38px;
  50. line-height: 38px;
  51. font-size: 0;
  52. }
  53. .chat-bottom-area-tool img {
  54. margin: 7px 10px;
  55. }
  56. .chat-bottom-area-textarea {
  57. margin-left: 10px;
  58. }
  59. .chat-bottom-area-textarea textarea {
  60. display: block;
  61. width: 100%;
  62. padding: 5px 0 0;
  63. height: 68px;
  64. line-height: 20px;
  65. border: none;
  66. overflow: auto;
  67. resize: none;
  68. background: 0 0;
  69. }
  70. .chat-bottom-area-send-space {
  71. position: relative;
  72. height: 46px;
  73. }
  74. .chat-bottom-area-send {
  75. position: absolute;
  76. right: 15px;
  77. top: 3px;
  78. height: 32px;
  79. line-height: 32px;
  80. cursor: pointer;
  81. }
  82. .chat-bottom-area-send-btn {
  83. border-radius: 3px 0 0 3px;
  84. }
  85. .chat-bottom-area-send span {
  86. display: inline-block;
  87. vertical-align: top;
  88. font-size: 14px;
  89. line-height: 32px;
  90. margin-left: 5px;
  91. padding: 0 20px;
  92. background-color: #5FB878;
  93. color: #fff;
  94. border-radius: 3px;
  95. }
  96. .chat-sender {
  97. clear: both;
  98. font-size: 80%;
  99. }
  100. .chat-sender div:nth-of-type(1) {
  101. float: left;
  102. }
  103. .chat-sender div:nth-of-type(2) {
  104. margin: 0 50px 2px 50px;
  105. padding: 0px;
  106. color: #848484;
  107. font-size: 70%;
  108. text-align: left;
  109. }
  110. .chat-sender div:nth-of-type(3) {
  111. background-color: white;
  112. /*float: left;*/
  113. margin: 0 50px 10px 50px;
  114. padding: 10px 10px 10px 10px;
  115. border-radius: 7px;
  116. text-indent: -12px;
  117. }
  118. .chat-receiver {
  119. clear: both;
  120. font-size: 80%;
  121. }
  122. .chat-receiver div:nth-of-type(1) {
  123. float: right;
  124. }
  125. .chat-receiver div:nth-of-type(2) {
  126. margin: 0px 50px 2px 50px;
  127. padding: 0px;
  128. color: #848484;
  129. font-size: 70%;
  130. text-align: right;
  131. }
  132. .chat-receiver div:nth-of-type(3) {
  133. /*float:right;*/
  134. background-color: #b2e281;
  135. margin: 0px 50px 10px 50px;
  136. padding: 10px 10px 10px 10px;
  137. border-radius: 7px;
  138. }
  139. .chat-receiver div:first-child img,
  140. .chat-sender div:first-child img {
  141. width: 40px;
  142. height: 40px;
  143. /*border-radius: 10%;*/
  144. }
  145. .chat-left_triangle {
  146. height: 0px;
  147. width: 0px;
  148. border-width: 6px;
  149. border-style: solid;
  150. border-color: transparent white transparent transparent;
  151. position: relative;
  152. left: -22px;
  153. top: 3px;
  154. }
  155. .chat-right_triangle {
  156. height: 0px;
  157. width: 0px;
  158. border-width: 6px;
  159. border-style: solid;
  160. border-color: transparent transparent transparent #b2e281;
  161. position: relative;
  162. right: -22px;
  163. top: 3px;
  164. }
  165. .chat-notice {
  166. clear: both;
  167. font-size: 70%;
  168. color: white;
  169. text-align: center;
  170. margin-top: 15px;
  171. margin-bottom: 15px;
  172. }
  173. .chat-notice span {
  174. background-color: #cecece;
  175. line-height: 25px;
  176. border-radius: 5px;
  177. padding: 5px 10px;
  178. }
  179. </style>
  180. </head>
  181. <body>
  182. <!-- title -->
  183. <div class="chat-title">
  184. <span>姓名或群名</span>
  185. </div>
  186. <div class="chat-content">
  187. <!-- Left -->
  188. <div class="chat-sender">
  189. <div><img src="https://git.o2oa.net/uploads/-/system/project/avatar/20/logo_o2_1000_round.png?width=64"></div>
  190. <div>阿奔 Ben</div>
  191. <div>
  192. <div class="chat-left_triangle"></div>
  193. <span> 苹果增加三款配件的颜色选项</span>
  194. </div>
  195. </div>
  196. <!-- Right -->
  197. <div class="chat-receiver">
  198. <div><img src="img/max.png"></div>
  199. <div>好人·马克思</div>
  200. <div>
  201. <div class="chat-right_triangle"></div>
  202. <span> 但是如果你正在再发新的APP跨平台项目,我建议你考虑一下Ionic2/Ionic3。 ionic2/Ionic3的架构使得“单一职责原则”得到了体现,组件、页面之间相互独立,有利于内聚和解耦。</span>
  203. </div>
  204. </div>
  205. <!-- Right -->
  206. <div class="chat-sender">
  207. <div><img src="img/adam.jpg"></div>
  208. <div>阿达姆 Adam</div>
  209. <div>
  210. <div class="chat-left_triangle"></div>
  211. <span> 一款接近原生的Html5移动App开发框架</span>
  212. </div>
  213. </div>
  214. <!-- Notice/Center -->
  215. <div class="chat-notice">
  216. <span>2017年12月10日 23:13</span>
  217. </div>
  218. <!-- Left -->
  219. <div class="chat-sender">
  220. <div><img src="img/perry.png" /></div>
  221. <div>佩里 Perry</div>
  222. <div>
  223. <div class="chat-left_triangle"></div>
  224. <span> Ionic遵循视图控制模式,通俗的理解和 Cocoa 触摸框架相似。在视图控制模式中,我们将界面的不同部分分为子视图或包含其他视图的子视图控制器。</span>
  225. </div>
  226. </div>
  227. <!-- Left -->
  228. <div class="chat-sender">
  229. <div><img src="img/mike.png"></div>
  230. <div>麦克</div>
  231. <div>
  232. <div class="chat-left_triangle"></div>
  233. <span> 你可以用ionRefresher指令实现拉动刷新,并可以用ionInfiniteScroll指令实现无限滚动。</span>
  234. </div>
  235. </div>
  236. <!-- Right -->
  237. <div class="chat-receiver">
  238. <div><img src="img/max.png"></div>
  239. <div>好人·马克思</div>
  240. <div>
  241. <div class="chat-right_triangle"></div>
  242. <span> 最后但并非最不重要的是</span>
  243. </div>
  244. </div>
  245. <!-- Notice/Center -->
  246. <div class="chat-notice">
  247. <span>你被群主移除群聊</span>
  248. </div>
  249. <!-- Left -->
  250. <div class="chat-sender">
  251. <div><img src="img/mike.png"></div>
  252. <div>麦克</div>
  253. <div>
  254. <div class="chat-left_triangle"></div>
  255. <span> 你可以用ionRefresher指令实现拉动刷新,并可以用ionInfiniteScroll指令实现无限滚动。</span>
  256. </div>
  257. </div>
  258. <!-- Right -->
  259. <div class="chat-receiver">
  260. <div><img src="img/max.png"></div>
  261. <div>好人·马克思</div>
  262. <div>
  263. <div class="chat-right_triangle"></div>
  264. <span> 最后但并非最不重要的是</span>
  265. </div>
  266. </div>
  267. <!-- Notice/Center -->
  268. <div class="chat-notice">
  269. <span>你被群主移除群聊</span>
  270. </div>
  271. <!-- Left -->
  272. <div class="chat-sender">
  273. <div><img src="img/mike.png"></div>
  274. <div>麦克</div>
  275. <div>
  276. <div class="chat-left_triangle"></div>
  277. <span> 你可以用ionRefresher指令实现拉动刷新,并可以用ionInfiniteScroll指令实现无限滚动。</span>
  278. </div>
  279. </div>
  280. <!-- Right -->
  281. <div class="chat-receiver">
  282. <div><img src="img/max.png"></div>
  283. <div>好人·马克思</div>
  284. <div>
  285. <div class="chat-right_triangle"></div>
  286. <span> 最后但并非最不重要的是</span>
  287. </div>
  288. </div>
  289. <!-- Notice/Center -->
  290. <div class="chat-notice">
  291. <span>你被群主移除群聊</span>
  292. </div>
  293. </div>
  294. <div class="chat-bottom-area">
  295. <div class="chat-bottom-area-tool">
  296. <img src="./icons/icon-emoji.png" />
  297. </div>
  298. <div class="chat-bottom-area-textarea"><textarea></textarea></div>
  299. <div class="chat-bottom-area-send-space">
  300. <div class="chat-bottom-area-send">
  301. <span class="chat-bottom-area-send-btn">发送</span>
  302. </div>
  303. </div>
  304. </div>
  305. </body>
  306. </html>