@import url(reset.css); @import url('https://fonts.googleapis.com/css?family=Montserrat:600&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap'); *{ font-family: "Poppins", sans-serif ; margin: 0; padding: 0; box-sizing: border-box; list-style: none; text-decoration: none; } body::-webkit-scrollbar { width: 10px; /* Chiều rộng vùng chứa scrollbar */ } body::-webkit-scrollbar-track { background: none; /* Màu nền ngoài của thanh scrollbar */ } body::-webkit-scrollbar-thumb { background-color: #ccc; /* Màu của thanh cuộn (scroll thumb) */ border-radius: 10px; /* Bo góc scroll thumb */ border: 0.1px solid none; /* Không hỗ trợ padding, margin, transition nên dùng viền cùng màu nên để padding scroll thumb */ } body::-webkit-scrollbar-thumb:hover { background-color: gray; /* Hiệu ứng di chuột đổi màu*/ } body{ font-family: 'Poppins', sans-serif; min-height: 100vh; background: #f8f8f8; display: flex; } :root { --gradient: linear-gradient(to right, #e2336b, #fcac46); } .container{ width: 100%; height: 100%; position: relative; top: 0; } .sidebar{ position: fixed; width: 300px; height: 100vh; background: #f8f8f8; padding: 20px; border-radius: 10px 10px 10px 10px; z-index: 2000; } .main-home{ position: absolute; width: 75%; min-height: 100vh; right: 0px; top: 0; height: max-content; /* margin-left: 300px; */ background: #fff; border-radius: 1rem 0 0 1rem; z-index: 1000; } .logo{ margin-left: 10px; } .logo img { width: 70px; } .profile{ display: flex; flex-direction: column; align-items: center; justify-content: center; margin-top: 3rem; } .profile-img{ display: flex; align-items: center; justify-content: center; width: 80px; height: 80px; border-radius: 50%; border: 2px solid #e2336b; } .profile-img img{ width: 70px; height: 70px; object-fit: cover; border-radius: 50%; object-position: center; } .name{ display: flex; align-items: center; margin: 1rem 0 0.4rem; } .name h1{ font-size: 1.1rem; } .name img{ margin-left: 4px; width: 20px; object-fit: contain; } .profile-img span{ font-size: 0.938rem; font-weight: 400px; text-align: center; } .menu { margin-top: 20px; position: sticky; } .menu div{ margin-top: 20px; position: relative; } .menu a{ font-size: 20px; } .menu .icon { position: absolute; left: 0; top: 50%; transform: translateY(-50%); cursor: pointer; max-width: 30px; } .menu div a:hover{ color: #e2336b; background: #ccc; } .main-home .main-home-header { position: absolute; top: 0px; width: 100%; height: 80px; z-index: 1005; position: fixed; background: #fff; background: #f8f8f8; } .main-home .main-home-header .search{ width: 20%; position: absolute; top: 15%; left: 12%; } .main-home .main-home-header .search input[type="text"] { border: none; outline: none; background: #ffff; padding: 1rem 1.5rem; padding-left: calc(1rem * 2.5); border-radius: 100px; width: 100%; position: absolute; top: 0; left: 40%; } .main-home .main-home-header .add-photo { position: absolute; top: 15%; left: 4%; width: 150px; border: none; outline: none; background: linear-gradient(to right, #f3357f, #ffb769); padding: 1rem 1.5rem; padding-left: calc(1.5rem); border-radius: 25px; transition: background .5s; font-size: 15px; } .main-home .main-home-header .icon{ position: absolute; left: 60%; top: 50%; transform: translateY(-50%); width: 80px; } .main-home .main-home-header .message{ max-width: 30px; float: left; color: black; } .main-home .main-home-header .nofication{ max-width: 30px; float: right; color: black; } .main-home .story { width: 100%; height: 50px; margin-top: 80px; } .main-home .feed { width: 100%; height: max-content; margin-top: 10px; } .main-home h1{ margin-left: 20px; width: max-content; } .main-home .feed .feed-content { width: 750px; height: max-content; margin-left: 250px; } .main-home .story div{ display: flex; align-items: center; justify-content: center; width: 80px; height: 80px; border-radius: 50%; border: 2px solid #e2336b; float: left; margin-top: 10px; margin-left: 30px; } .main-home .story img{ width: 70px; height: 70px; object-fit: cover; border-radius: 50%; object-position: center; } .main-home .feed .feed-content .post{ display: flex; justify-content: center; flex-direction: column; width: 100%; border: 3px solid #f8f8f8; margin-top: 15px; height: max-content; } .main-home .feed .feed-content .post .post-header{ height: max-content; width: 100%; } .main-home .feed .feed-content .post .post-header h1{ margin-left: 70px; margin-top: -60px; } .main-home .feed .feed-content .post .post-header >img{ width: 50px; height: 50px; object-fit: cover; border-radius: 50%; object-position: center; margin-left: 10px; margin-top: 10px; } .post-img{ width: 100%; height: 100%; display: flex; border-radius: 50px; align-items: center; justify-content: center; } .main-home .feed .feed-content .post .post-img >img{ object-fit: cover; object-position: center; border-radius: 20px; margin-top: 30px; padding: 10px; } .main-home .feed .feed-content .post .comment{ width: 90%; height: 20rem; margin-left: 5%; border-top: 3px solid #f8f8f8; float: right; padding: 15px; position: relative; } .heart-btn{ position: absolute; top: 0%; left: 8%; } .content{ padding: 13px 16px; display: flex; border-radius: 5px; cursor: pointer; } .heart{ position: absolute; background: url("../img/img.png") no-repeat; background-position: left; background-size: 2900%; height: 90px; width: 90px; top: 50%; left: 21%; transform: translate(-50%,-50%); } .text{ font-size: 21px; margin-left: 30px; color: grey; font-family: 'Montserrat',sans-serif; } .numb:before{ content: '1'; font-size: 21px; margin-left: 7px; font-weight: 600; color: #9C9496; font-family: sans-serif; } .numb.heart-active:before{ content: '2'; color: #000; } .text.heart-active{ color: #000; } .heart.heart-active{ animation: animate .8s steps(28) 1; /*animation name, animation-duration, animation-timing-funcion, animation-iteration-count*/ background-position: right; } @keyframes animate { 0%{ background-position: left; } 100%{ background-position: right; } } .main-home .feed .feed-content .post .comment .btn{ width: 50px; height: 50px; border: 0; background: #fff; font-size: 35px; margin-top: 20px; } .main-home .feed .feed-content .post .comment .handle-comment{ position: absolute; bottom: 0px; left: 0px; width: 100%; height: 15rem; } .main-home .feed .feed-content .post .comment .handle-comment input[type="text"]{ position: absolute; top: 0px; left: 0px; border: none; width: 90%; background: #f8f8f8; border-radius: 100px; padding: 1rem; } .main-home .feed .feed-content .post .comment .handle-comment button{ position: absolute; right: 0px; border: none; border-radius: 10px; padding: 10px; } .main-home .feed .feed-content .post .comment .handle-comment #old-comment{ position: absolute; bottom: 0px; width: 100%; height: max-content; overflow:auto; } .main-home .feed .feed-content .post .comment .share-icon{ position: absolute; width: 30px; height: 30px; color: grey; transform: translate(-50%,-50%); background-size: 2900%; top: 30%; } .main-home .feed .feed-content .post .comment .share{ position: absolute; top: 10px; left: 70%; width: 136.84px; height: 58px; } .cs{ font-size: 21px; margin-left: 20px; color: grey; font-family: 'Montserrat',sans-serif; } .hmessage{ width: 100%; height: 300px; } .hmessage .message-left{ border-right: 1px solid black; width: 500px; position: relative; padding: 15px; height: 40%; } .hmessage .message-left div:hover { background: #f8f8f8; } .hmessage .message-left .message-item img{ width: 70px; height: 70px; object-fit: cover; border-radius: 50%; object-position: center; } .hmessage .message-left .message-item .message-name{ position: absolute; left: 90px; top: 20px; } .hmessage .message-right{ width: 100%; height: 100%; position: relative; margin-left: 500px; transform: translateY(-10%); padding: 20px; } .hmessage .message-right form{ position: absolute; bottom: 0px; } .hmessage .message-right input[type="text"]{ border: none; border-radius: 100px; background: #f8f8f8; padding: 1rem; width: 550px; } .hmessage .message-right button{ border: none; border-radius: 50%; padding: 1rem; } .hmessage .message-right #sended-message{ position: absolute; } .menu .sub-menu { display: none; margin-left: 100px; } .menu div:hover .sub-menu { display: block; } .menu div:hover { background: #ccc; color: #e2336b; } .menu .sub-menu .sub-menu-2 { display: none; margin-left: 150px; } .menu .sub-menu div:hover .sub-menu-2 { display: block; } .menu .sub-menu div:hover { background: #ccc; color: #e2336b; }