chat.wxss 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. @charset "UTF-8";
  2. /* 需要放到文件最上面 */
  3. /* 水平间距 */
  4. /* 水平间距 */
  5. /*
  6. 以下变量是默认值,如不需要修改可以不用给下面的变量重新赋值
  7. */
  8. /* 水平间距 */
  9. /* 设置常用元素尺寸规则 */
  10. view,
  11. textarea,
  12. input,
  13. label,
  14. form,
  15. button,
  16. image {
  17. box-sizing: border-box;
  18. }
  19. /* 按钮样式处理 */
  20. button {
  21. font-size: 28rpx;
  22. }
  23. /* 取消按钮默认的边框线效果 */
  24. button:after {
  25. border: none;
  26. }
  27. /* 设置图片默认样式,取消默认尺寸 */
  28. image {
  29. display: block;
  30. height: auto;
  31. width: auto;
  32. }
  33. /* 输入框默认字体大小 */
  34. textarea,
  35. input {
  36. font-size: 28rpx;
  37. }
  38. /* 列式弹性盒子 */
  39. .flex_col {
  40. display: flex;
  41. flex-direction: row;
  42. flex-wrap: nowrap;
  43. justify-content: flex-start;
  44. align-items: center;
  45. align-content: center;
  46. }
  47. /* 行式弹性盒子 */
  48. .flex_row {
  49. display: flex;
  50. flex-direction: column;
  51. flex-wrap: nowrap;
  52. justify-content: flex-start;
  53. align-items: flex-start;
  54. align-content: flex-start;
  55. }
  56. /* 弹性盒子弹性容器 */
  57. .flex_col .flex_grow {
  58. width: 0;
  59. flex-grow: 1;
  60. }
  61. .flex_row .flex_grow {
  62. flex-grow: 1;
  63. }
  64. /* 弹性盒子允许换行 */
  65. .flex_col.flex_wrap {
  66. flex-wrap: wrap;
  67. }
  68. /* 弹性盒子居中对齐 */
  69. .flex_col.flex_center,
  70. .flex_row.flex_center {
  71. justify-content: center;
  72. }
  73. /* 列式弹性盒子两端对齐 */
  74. .flex_col.flex_space {
  75. justify-content: space-between;
  76. }
  77. /* 弹性盒子快速分栏 ,这里非常郁闷 uniapp 居然不支持 * 选择器 */
  78. .flex_col.flex_col_2 > view {
  79. width: 50%;
  80. }
  81. .flex_col.flex_col_3 > view {
  82. width: 33.33333%;
  83. }
  84. .flex_col.flex_col_4 > view {
  85. width: 25%;
  86. }
  87. .flex_col.flex_col_5 > view {
  88. width: 20%;
  89. }
  90. .flex_col.flex_col_6 > view {
  91. width: 16.66666%;
  92. }
  93. /* 字体颜色 */
  94. .color_333 {
  95. color: #333;
  96. }
  97. .color_666 {
  98. color: #666;
  99. }
  100. .color_999 {
  101. color: #999;
  102. }
  103. .color_ccc {
  104. color: #ccc;
  105. }
  106. .color_fff {
  107. color: #fff;
  108. }
  109. .color_6dc {
  110. color: #6dca6d;
  111. }
  112. .color_d51 {
  113. color: #d51917;
  114. }
  115. .color_09f {
  116. color: #0099ff;
  117. }
  118. /* 背景色*/
  119. .bg_fff {
  120. background-color: #ffffff;
  121. }
  122. /* 字体大小 */
  123. .size_10 {
  124. font-size: 20rpx;
  125. }
  126. .size_12 {
  127. font-size: 24rpx;
  128. }
  129. .size_14 {
  130. font-size: 28rpx;
  131. }
  132. .size_16 {
  133. font-size: 32rpx;
  134. }
  135. .size_18 {
  136. font-size: 36rpx;
  137. }
  138. .size_20 {
  139. font-size: 40rpx;
  140. }
  141. /* 字体加粗 */
  142. .font_b {
  143. font-weight: bold;
  144. }
  145. /* 对齐方式 */
  146. .align_c {
  147. text-align: center;
  148. }
  149. .align_l {
  150. text-align: left;
  151. }
  152. .align_r {
  153. text-align: right;
  154. }
  155. /* 遮罩 */
  156. .shade {
  157. position: fixed;
  158. top: 0;
  159. right: 0;
  160. bottom: 0;
  161. left: 0;
  162. background-color: rgba(0, 0, 0, 0.8);
  163. z-index: 100;
  164. }
  165. /* 弹窗 */
  166. .shade_box {
  167. position: fixed;
  168. top: 0;
  169. right: 0;
  170. bottom: 0;
  171. left: 0;
  172. margin: auto;
  173. z-index: 101;
  174. min-width: 200rpx;
  175. min-height: 200rpx;
  176. }
  177. /* 加载数据提示 */
  178. .tips {
  179. position: fixed;
  180. left: 0;
  181. top: 0px;
  182. width: 100%;
  183. z-index: 9;
  184. background-color: rgba(0, 0, 0, 0.15);
  185. height: 72rpx;
  186. line-height: 72rpx;
  187. -webkit-transform: translateY(-80rpx);
  188. transform: translateY(-80rpx);
  189. transition: -webkit-transform 0.3s ease-in-out 0s;
  190. transition: transform 0.3s ease-in-out 0s;
  191. transition: transform 0.3s ease-in-out 0s, -webkit-transform 0.3s ease-in-out 0s;
  192. }
  193. .tips.show {
  194. -webkit-transform: translateY(0);
  195. transform: translateY(0);
  196. }
  197. .box-1 {
  198. width: 100%;
  199. height: auto;
  200. padding-bottom: 100rpx;
  201. box-sizing: content-box;
  202. /* 兼容iPhoneX */
  203. margin-bottom: 0;
  204. margin-bottom: constant(safe-area-inset-bottom);
  205. margin-bottom: env(safe-area-inset-bottom);
  206. }
  207. .box-2 {
  208. position: fixed;
  209. left: 0;
  210. width: 100%;
  211. bottom: 0;
  212. height: auto;
  213. z-index: 2;
  214. border-top: #e5e5e5 solid 1px;
  215. box-sizing: content-box;
  216. background-color: #F3F3F3;
  217. /* 兼容iPhoneX */
  218. padding-bottom: 0;
  219. padding-bottom: constant(safe-area-inset-bottom);
  220. padding-bottom: env(safe-area-inset-bottom);
  221. }
  222. .box-2 > view {
  223. padding: 0 20rpx;
  224. height: 100rpx;
  225. }
  226. .box-2 .content {
  227. background-color: #fff;
  228. height: 64rpx;
  229. padding: 0 20rpx;
  230. border-radius: 32rpx;
  231. font-size: 28rpx;
  232. }
  233. .box-2 .send {
  234. background-color: #42b983;
  235. color: #fff;
  236. height: 64rpx;
  237. margin-left: 20rpx;
  238. border-radius: 32rpx;
  239. padding: 0;
  240. width: 120rpx;
  241. line-height: 62rpx;
  242. }
  243. .box-2 .send:active {
  244. background-color: #5fc496;
  245. }
  246. .talk-list {
  247. padding-bottom: 20rpx;
  248. /* 消息项,基础类 */
  249. }
  250. .talk-list .item {
  251. padding: 20rpx 20rpx 0 20rpx;
  252. align-items: flex-start;
  253. align-content: flex-start;
  254. color: #333;
  255. /* 收到的消息 */
  256. /* 发出的消息 */
  257. }
  258. .talk-list .item .pic {
  259. width: 92rpx;
  260. height: 92rpx;
  261. border-radius: 50%;
  262. border: #fff solid 1px;
  263. }
  264. .talk-list .item .content {
  265. padding: 20rpx;
  266. border-radius: 4px;
  267. max-width: 500rpx;
  268. word-break: break-all;
  269. line-height: 52rpx;
  270. position: relative;
  271. }
  272. .talk-list .item.pull .content {
  273. margin-left: 32rpx;
  274. background-color: #fff;
  275. }
  276. .talk-list .item.pull .content::after {
  277. content: '';
  278. display: block;
  279. width: 0;
  280. height: 0;
  281. border-top: 16rpx solid transparent;
  282. border-bottom: 16rpx solid transparent;
  283. border-right: 20rpx solid #fff;
  284. position: absolute;
  285. top: 30rpx;
  286. left: -18rpx;
  287. }
  288. .talk-list .item.push {
  289. /* 主轴为水平方向,起点在右端。使不修改DOM结构,也能改变元素排列顺序 */
  290. flex-direction: row-reverse;
  291. }
  292. .talk-list .item.push .content {
  293. margin-right: 32rpx;
  294. background-color: #a0e959;
  295. }
  296. .talk-list .item.push .content::after {
  297. content: '';
  298. display: block;
  299. width: 0;
  300. height: 0;
  301. border-top: 16rpx solid transparent;
  302. border-bottom: 16rpx solid transparent;
  303. border-left: 20rpx solid #a0e959;
  304. position: absolute;
  305. top: 30rpx;
  306. right: -18rpx;
  307. }