css布局模仿微信pc端聊天软件ui界面效果代码

代码语言:html

所属分类:布局界面

代码描述:css布局模仿微信pc端聊天软件ui界面效果代码

代码标签: 微信 pc 聊天 软件 ui 界面 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
<meta charset="UTF-8">


<style>
    * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: sans-serif;
}

body {
  background: linear-gradient(100deg, #0052d4, #4364f7, #5580b1);
  width: 100vw;
  height: 100vh;
}

.centerit {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.chat-container {
  background-color: #f4f4f4;
  width: 1250px;
  height: 790px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
}
.chat-container .top-bar {
  width: 100%;
  height: 80px;
  display: flex;
}
.chat-container aside {
  width: 425px;
  height: 100%;
  background-color: #363e47;
  display: flex;
  flex-direction: column;
}
.chat-container aside .top-bar {
  background-color: #303841;
  justify-content: space-between;
}
.chat-container aside .menu-burger-container {
  margin: 20px;
  height: 40px;
  width: 40px;
  cursor: pointer;
}
.chat-container aside .menu-burger-container:hover > .menu-burger, .chat-container aside .menu-burger-container:hover > .menu-burger:before, .chat-container aside .menu-burger-container:hover > .menu-burger:after {
  animation-name: menuHover;
}
.chat-container aside .menu-burger-container .menu-burger {
  height: 2px;
  width: 10px;
  background-color: #fff;
  top: 20px;
  left: 10px;
  position: relative;
}
.chat-container aside .menu-burger-container .menu-burger, .chat-container aside .menu-burger-container .menu-burger:before, .chat-container aside .menu-burger-container .menu-burger:after {
  animation-duration: 1s;
  animation-iteration-count: infinite;
}
.chat-container aside .menu-burger-container .menu-burger:before, .chat-container aside .menu-burger-container .menu-burger:after {
  content: '';
  height: 2px;
  width: 16px;
  background-color: #fff;
  display: block;
  position: relative;
}
.chat-container aside .menu-burger-container .menu-burger:before {
  top: -6px;
  animation-delay: 500ms;
}
.chat-container aside .menu-burger-container .menu-burger:after {
  top: 4px;
  animation-delay: 250ms;
}
.chat-container aside .new-conversation {
  height: 42px;
  padding: 0 20px;
  background-color: #01e777;
  border-radius: 25px;
  color: #ffffff;
  text-align: center;
  margin: 19px 30px;
  cursor: pointer;
  line-height: 42px;
  box-sizing: content-box;
  border: solid #01e777 0px;
  transition: all 200ms ease-in-out;
  font-size: 15px;
}
.chat-container aside .new-conversation:hover {
  transition: all 70ms ease-in-out;
  transform: translate(2px, -2px);
  border: solid #01e777 2px;
}
.chat-container aside .conversations {
  height: calc(100% - 80px);
  width: 100%;
}
.chat-container aside .conversations .thread {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  cursor: pointer;
}
.chat-container aside .conversations .thread.active {
  background-color: #3f4953;
}
.chat-container aside .conversations .thread:hover {
  background-color: #3f4953;
}
.chat-container aside .conversations .thread .details {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  grid-template-areas: "user-image user-name" "user-image last-message";
  margin: 17px;
  align-items: center;
}
.chat-container aside .conversations .thread .details .user-head {
  grid-area: user-image;
  margin-right: 20px;
}
.chat-container aside .conversations .thread .details .user-name, .chat-container aside .conversations .thread .details .last-message {
  width: 260px;
}
.chat-container .........完整代码请登录后点击上方下载按钮下载查看

网友评论0