수평 스크롤메뉴 > 기술자료 | 해피정닷컴

수평 스크롤메뉴 > 기술자료

본문 바로가기

사이트 내 전체검색

수평 스크롤메뉴 > 기술자료

HTML 수평 스크롤메뉴

페이지 정보


본문

How To Create a Horizontal Scrollable Menu


<!doctype html>
<html>
<head>
<meta charset="utf-8">
<?php include "../favicon.php"; ?>
<?php if ($mobile) { ?><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=10, minimum-scale=0, user-scalable=yes"><?php } ?>
<style>
body { margin:0; border:0; text-align:center; }

.on  { font-size:15px; font-weight:bold;   color:#FF0; }
.off { font-size:12px; font-weight:normal; color:#fff; }

div.scrollmenu {
    background-color: #333;
    overflow: auto;
    white-space: nowrap;
}

div.scrollmenu a {
    display: inline-block;
    text-align: center;
    padding: 0 5px;
    text-decoration: none;
}
</style>
<title>수평 스크롤 메뉴</title>
</head>

<body>
<?php  if ($_GET['url'] == "") { // 기본문서 ?>
<div style="background:url(main4_bg.png) no-repeat top center;"><img src="main4.png" style="width:<?php if ($mobile) { echo "100%; max-width:"; } ?>1260px;"></div>

<?php  } elseif ($_GET['url'] == "main1") { // 시안1 ?>
<div style="background:url(main1_bg.png) no-repeat top center;"><img src="main1.png" style="width:<?php if ($mobile) { echo "100%; max-width:"; } ?>1260px;"></div>

<?php } elseif ($_GET['url']=="main2") { // 시안2 ?>
<div style="background:url(main2_bg.png?20190413) no-repeat top center;"><img src="main2.png?20190413" style="width:<?php if ($mobile) { echo "100%; max-width:"; } ?>1260px;"></div>

<?php } elseif ($_GET['url']=="main3") { // 시안3 ?>
<div style="background:url(main3_bg.png?20190413_4) no-repeat top center;"><img src="main3.png?20190413_4" style="width:<?php if ($mobile) { echo "100%; max-width:"; } ?>1020px;"></div>

<?php } elseif ($_GET['url']=="main4") { // 시안4 ?>
<div style="background:url(main4_bg.png?20190413) no-repeat top center;"><img src="main4.png?20190413" style="width:<?php if ($mobile) { echo "100%; max-width:"; } ?>1260px;"></div>

<?php } elseif ($_GET['url']=="sub4") { // 서브4 ?>
<div style="background:url(sub4_bg.png) no-repeat top center;"><img src="sub4.png" style="width:<?php if ($mobile) { echo "100%; max-width:"; } ?>1260px;"></div>

<?php } elseif ($_GET['url']=="mobile2") { // 모바일2 ?>
<div style="background:url() repeat-x top;"><img src="mobile2.png" style="width:<?php if ($mobile) { echo "100%; max-width:"; } ?>600px;"></div>

<?php } elseif ($_GET['url']=="mobile4") { // 모바일4 ?>
<div style="background:url() repeat-x top;"><img src="mobile4.png" style="width:<?php if ($mobile) { echo "100%; max-width:"; } ?>700px;"></div>

<?php } ?>



<div style="height:36px;"><?php // 상단고정높이만큼 높이를 지정 ?></div>
<div style="width:100%; position:fixed; bottom:0px; left:0px; z-index:10000000;" class="scrollmenu">
    <div style="height:40px; line-height:40px; text-align:center; color:#ffffff;"><!--고정높이 지정-->

<a href="?url=mobile4"  class="<?php if ($_GET['url'] == "mobile4" ) { echo "on"; } else { echo "off"; } ?>">시안4_모바일</a>
&nbsp;|&nbsp; 
<a href="?url=sub4"  class="<?php if ($_GET['url'] == "sub4" ) { echo "on"; } else { echo "off"; } ?>">시안4_서브</a>
&nbsp;|&nbsp; 
<a href="?url=main4"  class="<?php if ($_GET['url'] == "" || $_GET['url'] == "main4" ) { echo "on"; } else { echo "off"; } ?>">시안4</a>
&nbsp;|&nbsp; 
<a href="?url=main3"  class="<?php if ($_GET['url'] == "main3" ) { echo "on"; } else { echo "off"; } ?>">시안3</a>
&nbsp;|&nbsp; 
<a href="?url=mobile2" class="<?php if ($_GET['url'] == "mobile2") { echo "on"; } else { echo "off"; } ?>">시안2_모바일</a>
&nbsp;|&nbsp; 
<a href="?url=main2"  class="<?php if ($_GET['url'] == "main2" ) { echo "on"; } else { echo "off"; } ?>">시안2</a>
&nbsp;|&nbsp; 
<a href="?url=main1"  class="<?php if ($_GET['url'] == "main1" ) { echo "on"; } else { echo "off"; } ?>">시안1</a>

    </div>
</div>
</body>
</html>


참고자료
https://www.w3schools.com/howto/howto_css_menu_horizontal_scroll.asp
 

댓글목록

등록된 댓글이 없습니다.


Total 200건 1 페이지
  • RSS
기술자료 목록
200
HTML   4530  2023-04-07 09:52 ~ 2023-04-07 09:59  
199
HTML   3598  2023-02-02 13:54 ~ 2023-02-03 06:02  
198
HTML   4642  2022-01-30 10:50 ~ 2022-01-30 22:56  
197
HTML   8890  2021-11-18 16:00  
196
HTML   5225  2021-07-07 15:48 ~ 2021-07-07 15:51  
195
HTML   6856  2021-06-02 17:15 ~ 2021-06-02 17:15  
194
HTML   5164  2020-12-20 11:42  
193
HTML   5630  2020-09-08 23:42 ~ 2020-09-08 23:53  
192
HTML   6009  2020-06-07 18:40  
191
HTML   5946  2020-06-07 16:04 ~ 2020-12-12 09:09  
190
HTML   16315  2020-03-25 18:44 ~ 2021-09-23 18:51  
189
HTML   8210  2019-12-16 12:13 ~ 2019-12-16 12:46  
188
HTML   8966  2019-10-25 18:48 ~ 2019-10-25 18:49  
187
HTML   6942  2019-09-27 14:07 ~ 2019-09-27 14:08  
186
HTML   5381  2019-09-16 12:20  
185
HTML   5066  2019-08-11 13:03  
184
HTML   7074  2019-07-15 18:13 ~ 2019-07-15 22:48  
열람
HTML   6403  2019-04-16 11:40  
182
HTML   12586  2019-04-02 00:12 ~ 2019-04-02 01:17  
181
HTML   17402  2019-01-11 23:20 ~ 2019-01-11 23:24  

검색

해피정닷컴 정보

회사소개 회사연혁 협력사 오시는길 서비스 이용약관 개인정보 처리방침

회사명: 해피정닷컴   대표: 정창용   전화: 070-7600-3500   팩스: 042-670-8272
주소: (34368) 대전시 대덕구 대화로 160 대전산업용재유통단지 1동 222호
개인정보보호책임자: 정창용   사업자번호: 119-05-36414
통신판매업신고: 제2024-대전대덕-0405호 [사업자등록확인]  
Copyright 2001~2024 해피정닷컴. All Rights Reserved.