商丘12345 前端

chat.css 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. body{
  2. color: #4d4d4d;
  3. font: 14px/1.4em 'Helvetica Neue', Helvetica, 'Microsoft Yahei', Arial, sans-serif;
  4. background: #f5f5f5 url(img/chat_bg.jpg) no-repeat center;
  5. background-size: cover;
  6. }
  7. ul,li{
  8. list-style: none;
  9. margin: 0;
  10. padding: 0;
  11. }
  12. #chat{
  13. margin: 20px auto;
  14. width: 900px;
  15. height: 600px;
  16. overflow: hidden;
  17. border-radius: 3px;
  18. }
  19. .chat_left,.chat_sidebar{
  20. float: left;
  21. }
  22. .chat_left ul li{
  23. /*padding: 9pt 15px;*/
  24. padding: 10px 10px;
  25. border-bottom: 1px solid #292c33;
  26. cursor: pointer;
  27. color: #f4f4f4;
  28. }
  29. .chat_left ul li .chat_name{
  30. margin: 0;
  31. }
  32. .chat_sidebar{
  33. width: 200px;
  34. color: #f4f4f4;
  35. background-color: #2e3238;
  36. }
  37. #chat .chat_left,#chat .chat_main, #chat .chat_sidebar,.message_mincon{
  38. height: 100%;
  39. }
  40. #chat .chat_main ,.message_mincon{
  41. position: relative;
  42. overflow: hidden;
  43. background-color: #eee;
  44. }
  45. .ver_middle{
  46. vertical-align: middle;
  47. }
  48. #chat .chat_left{
  49. width: 70px;
  50. background: #2f3339;
  51. border-right: 1px solid #292c33;
  52. }
  53. /*chat_sidebar开始*/
  54. .pic_card{
  55. padding: 9pt;
  56. border-bottom: 1px solid #24272c;
  57. }
  58. .chat_name{
  59. display: inline-block;
  60. margin: 0 0 0 15px;
  61. font-size: 1pc;
  62. vertical-align: middle;
  63. font-size: 14px;
  64. }
  65. .chat_sidebar_foot{
  66. margin-top: 10px;
  67. }
  68. .sidebar_foot_seach{
  69. padding: 0 10px;
  70. width: 100%;
  71. font-size: 9pt;
  72. color: #fff;
  73. height: 30px;
  74. line-height: 30px;
  75. border: 1px solid #3a3a3a;
  76. border-radius: 4px;
  77. outline: 0;
  78. background-color: #26292e;
  79. }
  80. .chat_sidebar_list{
  81. height: 495px;
  82. overflow-y: auto;
  83. }
  84. .chat_sidebar_list li{
  85. /*padding: 9pt 15px;*/
  86. padding: 4pt 15px;
  87. border-bottom: 1px solid #292c33;
  88. cursor: pointer;
  89. -webkit-transition: background-color .1s;
  90. transition: background-color .1s;
  91. position: relative;
  92. }
  93. .chat_sidebar_list li.actives ,.chat_left li.actives{
  94. background-color: hsla(0,0%,100%,.1);
  95. }
  96. .chat_sidebar_list li.actives:hover ,.chat_left li.actives:hover{
  97. background-color: hsla(0,0%,100%,.1);
  98. }
  99. .chat_sidebar_list li:hover ,.chat_left li:hover{
  100. background-color: hsla(0,0%,100%,.03);
  101. }
  102. /*chat_sidebar结束*/
  103. /*聊天区域开始*/
  104. .message_count{
  105. display: inline-block;
  106. position: absolute;
  107. right: 0;
  108. border-radius: 50%;
  109. background: red;
  110. color: #fff;
  111. }
  112. .disnone{
  113. display: none;
  114. }
  115. .main_message{
  116. padding: 10px 15px;
  117. overflow-y: scroll;
  118. height: calc(100% - 12pc);
  119. margin-top: 2pc;
  120. }
  121. .chat_person{
  122. position: absolute;
  123. width: 100%;
  124. top: 0;
  125. left: 0;
  126. height: 2pc;
  127. line-height: 2pc;
  128. border-bottom: 1px solid #ddd;
  129. background: #fff;
  130. }
  131. .main_message li{
  132. margin-bottom: 15px;
  133. }
  134. .main_message .message_time{
  135. margin: 7px 0;
  136. text-align: center;
  137. }
  138. .main_message .ver_middle{
  139. float: left;
  140. margin: 0 10px 0 0;
  141. border-radius: 3px;
  142. }
  143. .main_message .message_text{
  144. display: inline-block;
  145. position: relative;
  146. padding: 0 10px;
  147. max-width: calc(100% - 40px);
  148. min-height: 30px;
  149. line-height: 2.5;
  150. font-size: 9pt;
  151. text-align: left;
  152. word-break: break-all;
  153. background-color: #fafafa;
  154. border-radius: 4px;
  155. }
  156. .main_message .message_text:before{
  157. content: " ";
  158. position: absolute;
  159. top: 9px;
  160. right: 100%;
  161. border: 6px solid transparent;
  162. border-right-color: #fafafa;
  163. }
  164. .main_message .self {
  165. text-align: right;
  166. }
  167. .main_message .self .ver_middle {
  168. float: right;
  169. margin: 0 0 0 10px;
  170. }
  171. .main_message .self .message_text {
  172. background-color: #b2e281;
  173. }
  174. .main_message .self .message_text:before {
  175. right: inherit;
  176. left: 100%;
  177. border-right-color: transparent;
  178. border-left-color: #b2e281;
  179. }
  180. .main_sendMessage{
  181. position: absolute;
  182. width: 100%;
  183. bottom: 0;
  184. left: 0;
  185. height: 10pc;
  186. border-top: 1px solid #ddd;
  187. background: #fff;
  188. }
  189. .main_sendMessage textarea{
  190. padding: 10px;
  191. height: 80%;
  192. width: 100%;
  193. border: none;
  194. outline: 0;
  195. font-family: Micrsofot Yahei;
  196. resize: none;
  197. }
  198. .main_sendMessage .send_btn{
  199. height: 20%;
  200. text-align: right;
  201. color: #4d4d4d;
  202. padding-right: 20px;
  203. }
  204. .main_sendMessage .send_btn button{
  205. border: 1px solid #ccc;
  206. background: #fff;
  207. outline: none;
  208. }
  209. .main_sendMessage .send_btn button:hover{
  210. background: #b2e281;
  211. }
  212. /*聊天区域结束*/