반응형
블로그 스킨
hELLO 티스토리 스킨을 소개합니다. — hELLO. (tistory.com)
블로그 최적화
https://truelifecomes.tistory.com/20
https://imheroim.tistory.com/70
skin.html (/header 아래 추가)
<!-- 상단 사이드바-->
<header class="header">
<div class="line-bottom display-none"></div>
<!-- inner-header -->
<div class="inner-header topnavmenu">
<div class="box-header">
<h1 class="title-logo">
</h1>
<!-- search-bar for PC -->
<div class="util use-top">
</div>
</div>
<!-- area-align -->
<div class="area-align">
<!-- area-gnb -->
<div class="area-gnb">
<nav class="topnavmenu">
<ul>
<li class="t_menu_category"><a href="/category/OS" target="">OS</a></li>
<li class="t_menu_category"><a href="/category/물리서버" target="">물리서버</a></li>
<li class="t_menu_category"><a href="/category/가상서버" target="">가상서버</a></li>
<li class="t_menu_category last"><a href="/category/보안" target="">보안</a></li>
</ul>
</nav>
</div>
style.css (맨 아래 추가)
/* header */
.header {
position: fixed;
width: 100%;
border-bottom: 1px solid #efefef;
z-index: 10;
transition: top 0.2s ease-in-out;
background: white;
}
.header .inner-header {
position: relative;
left: 150px;
max-width: 1020px;
margin: 0 auto;
}
/* .header .box-header:after {
content:'';
position: absolute;
left: 50%;
width: 50vw;
height: 1px;
margin-left: -50vw;
border-bottom: 1px solid #efefef;}
.header .borderbottomline:after {
border-bottom: none;} */
.header .title-logo {
display: flex;
flex-direction: column;
justify-content: center;
margin: 50px 0;
margin-bottom: 20px;
}
.header .link_logo {
display: flex;
max-width: 220px;
font-size: 18px;
font-weight: 600;
color: #333;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
min-height:22px;
}
.header .link_logo img {
max-height: 22px;
}
.header .box-log {
position: absolute;
top: -1px;
right: 0;
}
.header .button-menu {
display: none;
position: absolute;
top: 21px;
right: 80px;
padding: 10px;
border: none;
background: none;
cursor: pointer;
opacity: 1;
}
.header .button-menu:hover {
opacity: .7;
transition: .2s ease-out;
}
.header .area-slogun {
padding-top: 33px;
padding-bottom: 36px;
}
.header .area-slogun strong {
margin-bottom: 9px;
font-size: 36px;
font-family: Arial;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
max-height: 82px;
overflow: hidden;
white-space: normal;
word-break: keep-all;
}
.header .area-slogun p {
width: 500px;
margin: 0;
font-size: 13px;
line-height: 19px;
color: #999;
word-break: keep-all;
}
.header .area-gnb .topnavnone {
display: none;
}
.header .tt_category {
margin: 0;
padding: 0;
}
.header .tt_category ul {
padding: 0;
list-style: none;
}
.header .tt_category li {
list-style: none;
margin: 0;
padding: 0;
}
.header .tt_category .link_tit {
display: none;
}
.header .tt_category .category_list,
.header .topnavmenu > ul {
margin: 0;
position: absolute;
left: 50%;
transform: translateX(-60%);
top: 30px;
}
.header .tt_category .category_list li,
.header .topnavmenu > ul > li {
display: inline-block;
margin-right: 61px;
}
.header .topnavmenu > ul > li {
/* padding-bottom: 32px; */
}
.header .tt_category .category_list li:last-child,
.header .topnavmenu > ul > li:last-child {
margin-right: 0;
}
.header .tt_category .category_list .link_item,
.header .topnavmenu > ul > li > a {
position: relative;
display: block;
font-size: 16px;
font-weight: 500;
color: #333 !important;
text-decoration: none;
white-space: nowrap;
z-index: 2;
}
.header .tt_category .category_list .c_cnt {
display: none;
}
/* ----- media query - pc ----- */
@media screen and (min-width: 1061px) {
.header .category_list li:hover .sub_category_list {
display: flex;
}
.header .tt_category .category_list .sub_category_list {
position: absolute;
display: none;
top: 258px;
left: 0;
width: 100%;
height: 94px;
padding-top: 36px;
font-size: 13px;
color: #333;
z-index: 100;
}
.header .tt_category .category_list .sub_category_list:before {
content: '';
position: absolute;
top: 0;
left: 50%;
width: 100vw;
height: 94px;
margin-left: -50vw;
border-top: 1px solid #efefef;
background: #fff;
z-index: -1;
}
.header .link_sub_item {
font-size: 13px;
text-decoration: none;
color: #333;
}
.header .link_sub_item:hover {
text-decoration: underline;
}
.wrap-right .header .category_list > li,
.wrap-right .header .t_menu_home,
.wrap-right .header .t_menu_guestbook,
.wrap-right .header .t_menu_tag,
.wrap-right .header .t_menu_link_1,
.wrap-right .header .t_menu_category{
padding: 32px 0 32px 0;
}
.wrap-drawer .header .tt_category .category_list .sub_category_list {
top: 49px;
}
#tt-body-tag.headerslogundisplayon .wrap-right .sub_category_list,
#tt-body-archive.headerslogundisplayon .wrap-right .sub_category_list,
#tt-body-category.headerslogundisplayon .wrap-right .sub_category_list,
#tt-body-search.headerslogundisplayon .wrap-right .sub_category_list,
#tt-body-guestbook.headerslogundisplayon .wrap-right .sub_category_list {
top: 263px;
}
#tt-body-page .wrap-right .sub_category_list {
top: 103px;
}
.header .tt_category .category_list > li:hover > a:after,
.header .topnavmenu > ul > li:hover > a:after {
content: '';
position: absolute;
top: 16px;
left: 0;
bottom: -1px;
width: 100%;
height: 4px;
background: #AEACAC;
z-index: 1;
}
.wrap-drawer .header .tt_category .category_list .link_item,
.wrap-drawer .header .topnavmenu > ul > li > a {
padding-bottom: 40px;
}
}
.header .topnavmenu .tt_category {
display: none;
}
.header .topnavmenu > ul {
margin: 0;
position: absolute;
left: 50%;
transform: translateX(-60%);
top: -30px;
}
/* ----- media query - mobile ----- */
@media screen and (max-width: 1060px) {
.wrap-right .header .topnavmenu > ul{
padding: 0;
position: absolute;
left: 50%;
transform: translateX(-55%);
top: -1px;
}
}
.header .slogun-use .area-slogun:before, .header .slogun-use nav:before {
border-top: none !important;
}
.header .slogun-use .tt_category .category_list,
.header .slogun-use .topnavmenu > ul {
margin-top: -1px;
padding-top: 0;
}
/* ----- media query - pc ----- */
@media screen and (min-width: 1061px) {
.headerslogundisplayoff.headerbannerdisplayoff .wrap-right .header .tt_category,
.headerslogundisplayoff.headerbannerdisplayoff .wrap-right .header .topnavmenu > ul{
/** padding-top: 32px; **/
}
.headerslogundisplayoff.headerbannerdisplayoff .wrap-right .sub_category_list {
top: 134px;
}
.headerslogundisplayoff.headerbannerdisplayoff .wrap-right .slogun-use .sub_category_list {
top: 290px;
}
.wrap-right .header .area-gnb .topnavmenu:before{
content: '';
position: absolute;
left: 50%;
width: 100vw;
height: 1px;
margin-left: -50vw;
border-top: 1px solid #efefef;
}
}
/* ----- media query - mobile ----- */
@media screen and (max-width: 1060px) {
.header .inner-header {
max-width: initial;
padding-top: 10px;
}
.header .title-logo {
position: absolute;
top: 15px;
left: 20px;
margin: 0;
}
.header .link_logo {
font-size: 16px;
}
.header .area-slogun {
display: none;
padding: 0 20px 0 20px;
}
.header .area-slogun strong {
display: block;
overflow: inherit;
max-height: 100%;
font-size: 30px;
margin-bottom: 10px;
line-height: 1.05;
}
.header .area-slogun p {
width: auto;
font-size: 12px;
}
.header .area-slogun.slogunmobileoff {
display: block;
}
.header .area-promotion {
display: none;
}
.header .area-promotion.bannermobile-on {
display: block;
}
.header .area-gnb {
width: 100%;
margin-bottom: 0;
border-top: 1px solid #efefef;
margin-top:30px;
}
.header .tt_category .category_list,
.header .topnavmenu > ul {
/* overflow-x: auto;
overflow-y: hidden; */
}
.header .tt_category .category_list li,
.header .topnavmenu > ul > li {
margin-right: 24px;
}
.header .tt_category .category_list li:first-child,
.header .topnavmenu > ul > li:first-child {
margin-left: 20px;
float:left;
}
.header .tt_category .category_list li:last-child,
.header .topnavmenu > ul > li:last-child{
margin-right:20px;
}
.header .tt_category .category_list .link_item,
.header .topnavmenu > ul > li > a {
padding: 20px 0 19px 0;
font-size: 13px;
font-weight: 400;
}
.header .button-menu {
display: block;
top: 5px;
right: 10px;
}
.header .button-menu svg {
width: 17px;
height: 12px;
}
.header .box-log {
display: none;
}
.header .topnavmenu > ul {
padding: 0;
position: absolute;
left: 50%;
transform: translateX(-40%);
top: -1px;
}
.wrap-right .header .topnavmenu > ul{
padding: 0;
}
}
/* // header */
element.style {
height: 101.11111px;
}
반응형