- 발행일
[WEB] 코코아톡 CSS 편 01
[WEB] 코코아톡 CSS 편 01
이 글은 네이버 블로그에 2020년 3월 14일에 올렸던 것을 그대로 옮겨온 것입니다.
.header-wrapper {
position: fixed;
z-index: 2;
width: 100%;
top: 0px;
padding: 1.5px 0px;
background-color: white;
}
.chats-body {
padding: 10px 0px;
padding-top: 100px;
}
.cahts-body .header,
.chats-body .status-bar {
padding: 0px 20px;
}
.chats-body {
background-image: url("../images/chatBg.png");
min-height: 1000vh;
}
.chat__write--container {
position: fixed;
bottom: 0px;
margin: 0 auto;
left: 0;
right: 0;
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
}
.chat__icon-left {
position: absolute;
left: 10px;
}
.chat__icon-right {
position: absolute;
right: 10px;
}
@keyframes float {
0% {
box-shadow: 0 30px 60px -12px rgba(50, 50, 93, 0.25),
0 18px 36px -18px rgba(0, 0, 0, 0.3),
0 -12px 36px -8px rgba(0, 0, 0, 0.025);
}
50% {
box-shadow: 0 30px 60px -60px rgba(50, 50, 93, 0.25),
0 18px 36px -18px rgba(0, 0, 0, 0.3),
0 -12px 36px -8px rgba(0, 0, 0, 0.025);
}
100% {
box-shadow: 0 30px 60px -12px rgba(50, 50, 93, 0.25),
0 18px 36px -18px rgba(0, 0, 0, 0.3),
0 -12px 36px -8px rgba(0, 0, 0, 0.025);
}
}
.chat__write {
margin: 0 auto;
bottom: 0px;
width: 100%;
border-radius: 0;
padding: 20px 60px;
border: none;
font-size: 14px;
transition: width 0.5s ease-in-out, box-shadow 0.5s ease-in-out,
border-radius 0.5s ease-in-out, transform 0.5s ease-in-out;
animation: float 3s linear infinite forwards;
}
.chat__write:focus {
outline: none;
width: 80%;
transform: translateY(-100px);
border-radius: 40px;
box-shadow: 0 30px 60px -12px rgba(50, 50, 93, 0.25),
0 18px 36px -18px rgba(0, 0, 0, 0.3), 0 -12px 36px -8px rgba(0, 0, 0, 0.025);
}
.chat__icon {
font-size: 18px;
transition: opacity 0.3s ease-in-out;
}
.chat__write:focus~.chat__icon {
opacity: 0;
}
.chat__write i {
font-size: 22px;
}
.chat__write-column:nth-child(2) {
width: 80%
}
.chat__write-column input {
padding: 20px 10px;
width: 100%;
border: none;
font-size: 14px;
}
.chats-body .chat__messages {
border-top: 1px solid #f7f7f7;
padding-top: 30px;
display: flex;
flex-direction: column;
align-items: center;
padding: 0px 20px;
}
.chat__messages .chat__timestamp {
background-color: white;
font-size: 12px;
padding: 5px 10px;
border-radius: 10px;
margin-top: 15px;
margin-bottom: 30px;
box-shadow: rgba(0, 0, 0, 0.3) 0px 8px 16px -8px,
rgba(0, 0, 0, 0.024) 0px -6px 16px -6px;
text-transform: uppercase;
font-weight: 700;
}
.message {
display: flex;
align-items: flex-start;
width: 50%;
margin-bottom: 20px;
}
.message .message__content {
width: 80%;
}
.incomming-message {
align-self: flex-start;
}
.sent-message {
align-self: flex-end;
}
@keyframes spin {
from {
transform: none;
}
to {
transform: rotateY(1turn);
}
}
.incomming-message img {
border-radius: 15px;
margin-right: 15px;
box-shadow: rgba(0, 0, 0, 0.3) 0px 8px 16px -8px,
rgba(0, 0, 0, 0.024) 0px -6px 16px -6px;
animation: spin 1s linear infinite;
}
.message .message__bubble {
background-color: white;
box-shadow: rgba(0, 0, 0, 0.3) 0px 8px 16px -8px,
rgba(0, 0, 0, 0.024) 0px -6px 16px -6px;
padding: 10px 20px;
display: block;
color: white;
border-radius: 20px;
font-weight: 600;
}
.incomming-message .message__author {
margin-bottom: 10px;
display: block;
font-weight: 600;
font-size: 12px;
}
.incomming-message .message__bubble {
border-bottom-left-radius: 0;
color: white;
background-image: linear-gradient(to right, #7b4397, #dc2430);
}
.sent-message .message__bubble {
border-bottom-right-radius: 0px;
color: white;
background-image: linear-gradient(to left, #00c6ff, #0072ff);
}
@keyframes incomingAnim {
from {
opacity: 0;
transform: translateX(-200px);
}
to {
opacity: 1;
transform: none;
}
}
.incomming-message {
animation: incomingAnim 0.5s ease-out forwards;
}
@keyframes sentAnimation {
from {
opacity: 0;
transform: translateX(200px);
}
to {
opacity: 1;
transform: none;
}
}
.sent-message {
animation: sentAnimation 0.5s ease-out forwards;
}
.find{
margin-top: 50px;
}
.find .find__header-list {
display: flex;
justify-content: space-around;
}
.find .header-btn {
display: flex;
flex-direction: column;
align-items: center;
}
.find .header-btn__title {
display: block;
}
.find .header-btn__title {
margin-top: 20px;
font-size: 14px;
}
.find .header-btn__icon {
font-size: 12px;
}
.find .find__recommended {
margin-top: 20px;
padding-top: 15px;
border-top: 1px solid #f7f7f7;
}
.find .find__title {
font-size: 12px;
opacity: 0.7;
margin-bottom: 20px;
}
.friend {
display: flex;
justify-content: space-between;
align-items: Center;
}
.friend .friend__avatar {
width: 50px;
border-radius: 38%;
}
.friend__avatar.g-avatar {
width: 70px;
}
.friend__avatar.m-avatar {
width: 60px;
}
.friend .friend__column {
display: flex;
align-items: center;
}
.friend .friend__avatar {
margin-left: 15px;
}
.friend__content .friend__name {
display: block;
font-weight: 600;
margin-bottom: 5px;
}
.friend__content .friend__status,
.friend__content .friend__bottom-text,
.friend .chat__timestamp {
opacity: 0.6;
}
.friend__content .friend__bottom-text {
font-size: 14px;
}
.friend__content .friend__status,
.friend .chat__timestamp {
font-size: 12px;
}
.friend .friend__now-listening {
border: 2px solid #5aad77;
padding: 5px 10px;
border-radius: 15px;
font-size: 14px;
}
.friend__now-listening span {
opacity: 0.6;
}
.friend__now-listening i {
font-size: 12px;
}
.friend__add-btn{
display: flex;
padding:10px 15px;
justify-content: center;
align-items: center;
background-color:#f5f5f5;
border-radius:5px;
}
.friends .friends__plus {
padding-bottom: 20px;
padding: 20px 0px;
border-top: 1px solid #f7f7f7;
border-bottom: 1px solid #f7f7f7;
margin: 20px 0px;
}
.friends__plus .friends__title,
.friends__list .friends__title {
font-size: 14px;
opacity: 0.6;
margin-bottom: 12px;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30px;
}
.header .header__title {
font-size: 24px;
font-weight: 600;
}
.header .header__icon {
font-size: 20px;
margin-left: 20px;
cursor: pointer;
}
.header .header__header-column {
display: flex;
align-items: center;
}
.header .header__back-btn {
font-size: 22px;
margin-right: 20px;
}
.bigScreen {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
background-color: #fce006;
display: flex;
justify-content: center;
align-items: center;
font-weight: 600;
color: white;
font-size: 28px;
text-align: center;
line-height: 1.5;
padding: 0px 20px;
display: none;
z-index: 4;
}
@media screen and (min-width:550px) {
.bigScreen {
display: flex;
}
}
.nav {
position: fixed;
width: 100%;
background-color: #fcfcfc;
padding: 20px 50px;
left: 0px;
top: 750px;
border-top: 1px solid #f7f7f7;
}
.nav .nav__list {
display: flex;
justify-content: space-between;
}
.nav i {
font-size: 20px;
}
.nav .nav__list-link {
position: relative;
}
.nav .nav__badge {
position: absolute;
top: -7px;
right: -7px;
color: white;
font-size: 10px;
background-color: #dc5d46;
width: 18px;
height: 18px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 50%;
}
@keyframes showNavBar {
from {
transform: translateY(80px);
}
to {
transform: none;
}
}
.nav {
animation: showNavBar 0.5s ease-out forwards;
animation-delay: 1;
}