HTML & CSS 연습/organic

organic.css

별초롱언니 2025. 3. 28. 17:28
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  list-style: none;
  color: inherit;
  overflow-X: hidden;
}

.container {
  width: 60%;
  margin: 0 auto;
  }
  
/* header top */
.h-t {
  background-color: #f5f5f5;
}
.h-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
}

/* header left */
.h-top-text {
  display: flex;
  margin: 0 20px;
  align-items: center;
  justify-content: space-around;
  font-size: 13px;
}
.h-top-text i {
  padding-right: 10px;
}
.h-top-text01, .h-top-text02 {
  padding-right: 20px;
}
.h-top-text02 {
  padding-left: 20px;
}

.h-top-text01 {
  border-right: 1px solid lightgray;
}


/* header right */
.h-top-right {
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 13px;
}
.h-top-icon i{
  margin-right: 10px;
}
.h-top-right-icon {
  padding-left: 20px;
}
.pinterest {
  padding-right: 20px;
  border-right: 1px solid lightgray;
}
.t-main-menu img {
  padding-left: 10px;
}
.user {
  padding-left: 20px;
  border-left: 1px solid lightgray;
}


/* dropdown */
/* 메인 메뉴 스타일링 */
.t-main-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: 'Arial', sans-serif;
}

.t-main-menu > li {
  display: inline-block;
  position: relative;
  padding: 10px 15px;
  background-color: #f8f8f8;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.t-main-menu > li:hover {
  background-color: #eaeaea;
}

.t-main-menu > li img {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 8px;
}

.t-main-menu > li span {
  margin-left: 8px;
}




/* 서브 메뉴 스타일링 */
.t-sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 200px; /* 서브 메뉴의 고정 너비 */
  background-color: white;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  padding: 10px 0; /* 서브 메뉴 항목 간 여백 */
  margin: 5px 0 0 0;
  list-style: none;
  display: none;
  z-index: 1000;
  max-height: none; /* 최대 높이 제한 없음 */
  overflow-y: visible; /* 스크롤바 없음 */
}

.t-sub-menu li {
  padding: 8px 15px; /* 서브 메뉴 항목 내부 여백 */
  transition: background-color 0.3s ease;
}

.t-sub-menu li:hover {
  background-color: #f0f0f0;
}

/* 메인 메뉴에 호버했을 때 서브 메뉴 표시 */
.t-main-menu > li:hover .t-sub-menu {
  display: block;
}

/* header bottom */
.h-bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.h-bottom-nav ul{
  display: flex;
}
.h-bottom-nav li {
  padding: 20px;
}

.h-bottom-icon {
  display: flex;
}
.h-bottom-icon i {
  margin-right:15px;
  margin-top:3px;
}


/* bottom dropdown */

/* .b-main-menu {
  display: flex;
}
.b-main-menu > li {
  background-color: yellow;
  margin-right: 10px;
  height: 30px;
  line-height: 30px;
}

.b-main-menu > li:nth-child(3) {
  position: relative;
}

.b-sub-menu {
  position: absolute;
  background-color: pink;
  top: 100%;
  left: 0px;
  padding: 7px;
  display: none;
}

.b-main-menu li:hover .b-sub-menu {
  display: block;
} */




/* main */
#main {
  display: flex;
  justify-content: space-between;
}
/* tab box */
#tab-box {
  white-space: nowrap;
  border: 1px solid #ebebeb;
  position: relative;
}

#tab-button {
  font-size: 0;
  background-color: #7fad39;
  color: white;
  padding: 10px;
}

#tab-button label {
  padding-left: 30px;
  font-size: 15px; 
  cursor: pointer; 
}

#tab-content {
  padding: 10px 0;
  padding-left: 30px;
  font-size: 15px; 
  display: none; /* 기본적으로 숨김 */
}

.m-search form [type=submit] {
  background-color: red;
}

.m-search {
  display: flex;
}

#main input {
  display: none;
}

.all {
  display: none;
}

#menu:checked ~ #tab-box #tab-content {
  display: block; /* 라디오 버튼 체크 시 드롭다운 표시 */
}

#menu:checked ~ #tab-box #tab-content .all {
  display: block; /* 항목 보이기 */
}




/* banner img */
.banner img{
  /* position: absolute; */
  margin-left: 300px;
}



/* slide */
.slidebox {
}

.slides {
  display: flex;
}





/* tab */


/* tab content 숨기기 */
.all {
  display: none;
}

/* tab content 나타내기 */
#menu01:checked ~ #tab-box .tab-content .all,
#menu02:checked ~ #tab-box .tab-content .oranges,
#menu03:checked ~ #tab-box .tab-content .fresh,
#menu04:checked ~ #tab-box .tab-content .vegetables,
#menu05:checked ~ #tab-box .tab-content .fastfood {
  display: block;
}

'HTML & CSS 연습 > organic' 카테고리의 다른 글

organic수정footer.css  (0) 2025.04.01
organic수정style.css  (0) 2025.04.01
organic수정html.css  (0) 2025.03.31
organic수정.html  (0) 2025.03.30
organic.html  (0) 2025.03.28