Newer
Older
smart_construction / miniprogram / components / chatroom / chatroom.wxss
zhout on 27 May 2020 2 KB Initial Commit
.chatroom {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.chatroom .header {
  flex-basis: fit-content;
  display: flex;
  flex-direction: row;
  border-bottom: 1px solid #ddd;
  padding: 20rpx 0 30rpx;
  font-size: 30rpx;
  /* background: rgb(34, 187, 47);
  color: rgba(255, 255, 255, 1) */
  /* font-family: 'Microsoft YaHei' */
}

.chatroom .header .left {
  flex: 1;
}

.chatroom .header .middle {
  flex: 2;
  text-align: center;
}

.chatroom .header .right {
  flex: 1;
}

.chatroom .body {
  flex: 2;
  display: flex;
  flex-direction: column;
  background: rgb(237,237,237);
  padding-bottom: 16rpx;
}

.body .message {
  display: flex;
  flex-direction: row;
  position: relative;
  margin: 12rpx 0;
}

.body .message.message__self {
  flex-direction: row-reverse;
}

.body .message .avatar {
  position: relative;
  top: 5rpx;
  width: 60rpx;
  height: 60rpx;
  border-radius: 5rpx;
  margin: 15rpx;
}

.body .message .main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.body .message.message__self .main {
  align-items: flex-end;
}

.body .message .nickname {
  font-size: 24rpx;
  color: #444;
}

.body .message .text-content {
  border: 1px solid transparent;
  border-radius: 3px;
  background-color: #fff;
  margin: 2px 0 0 0;
  padding: 4px 10px;
  font-size: 30rpx;
  display: inline-block;
}

.body .message.message__self .text-content {
  background-color: paleturquoise;
}

.body .message .text-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  max-width: 80%;
}

.body .message.message__self .text-wrapper .loading{
  font-size: 16rpx;
  margin-right: 18rpx;
}

.body .message .image-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.body .message .image-content {
  max-width: 240rpx;
  max-height: 240rpx;
}

.body .message.message__self .image-wrapper .loading {
  font-size: 20rpx;
  margin-right: 18rpx;
}

.chatroom .footer {
  flex-basis: fit-content;
  display: flex;
  flex-direction: row;
  border-top: 1px solid #ddd;
  font-size: 10rpx;
  padding: 20rpx 30rpx;
  background: rgb(246,246,246);
}

.chatroom .footer .message-sender {
  flex: 1;
  display: flex;
  flex-direction: row;
}

.message-sender .text-input {
  flex: 1;
  font-size: 16px;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 3px 6px;
  margin: 0 10px 0 5px;
  background: #fff;
}

.message-sender .btn-send-image {
  width: 50rpx;
  height: 50rpx;
  align-self: center;
}

button {
  font-size: 30rpx;
}

button.userinfo {
  background: darkturquoise;
  color: aliceblue;
  padding: 0 100rpx;
  border: 1px solid #ddd;
  border-radius: 20px;
}