100 lines
1.4 KiB
CSS
100 lines
1.4 KiB
CSS
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body>h1 {
|
|
text-align: center;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.app {
|
|
display: flex;
|
|
justify-content: center;
|
|
}
|
|
|
|
.chat-room {
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: 460px;
|
|
height: 480px;
|
|
margin: 20px;
|
|
background: #f7f7f7;
|
|
border: 1px solid #454545;
|
|
border-radius: 5px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.chat-room>header {
|
|
background: #454545;
|
|
color: white;
|
|
text-align: center;
|
|
padding: 10px;
|
|
}
|
|
|
|
.send {
|
|
flex: 0 0 40px;
|
|
display: flex;
|
|
border-top: 1px solid #454545;
|
|
}
|
|
|
|
.send>* {
|
|
border: none;
|
|
outline: none;
|
|
height: 100%;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.send>input {
|
|
flex: 1;
|
|
background: #fff;
|
|
padding: 0 10px;
|
|
}
|
|
|
|
.send>button {
|
|
flex: 0 0 100px;
|
|
background: #215fa4;
|
|
color: white;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.send>button:hover {
|
|
background: #4b80bb;
|
|
}
|
|
|
|
.list {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
list-style: none;
|
|
border-radius: 5px;
|
|
padding: 10px;
|
|
padding-bottom: 20px;
|
|
background: #f2f2f2;
|
|
}
|
|
|
|
.list>li {
|
|
margin-bottom: 10px;
|
|
padding: 10px;
|
|
background: #fff;
|
|
line-height: 1.5em;
|
|
border-radius: 5px;
|
|
}
|
|
|
|
.list>li>.content {
|
|
font-size: 14px;
|
|
text-align: left;
|
|
white-space: pre-wrap;
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
.list>li>.time {
|
|
font-size: 12px;
|
|
color: #4b80bb;
|
|
text-align: right;
|
|
}
|
|
|
|
.list>li:last-child {
|
|
border-bottom: none;
|
|
margin-bottom: 0;
|
|
} |