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

본문 바로가기

사이트 내 전체검색

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

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 2,648건 17 페이지
  • RSS
기술자료 목록
열람
HTML   7058  2019-04-16 11:40  
2327
영카트   7298  2019-04-14 22:24  
2326
HTML   13711  2019-04-02 00:12 ~ 2019-04-02 01:17  
2325
그누보드   6801  2019-03-22 14:25  
2324
전자결제   7187  2019-02-18 11:47  
2323
그누보드   7921  2019-02-16 01:51 ~ 2019-02-17 14:00  
2322
PHP   10187  2019-02-13 21:01  
2321
JavaScript   8507  2019-02-08 18:37 ~ 2019-02-08 19:32  
2320
그누보드   7783  2019-02-08 16:47 ~ 2019-02-08 16:54  
2319
그누보드   8374  2019-01-31 18:45 ~ 2020-10-06 19:03  
2318
PHP   8541  2019-01-31 18:26 ~ 2023-08-09 08:25  
2317
PHP   12452  2019-01-23 17:50 ~ 2021-08-26 15:58  
2316
PHP   8750  2019-01-23 15:38  
2315
etc보드   7360  2019-01-22 23:32  
2314
MySQL   9414  2019-01-22 00:43  
2313
Linux   8420  2019-01-21 15:38 ~ 2021-02-26 16:51  
2312
Linux   16919  2019-01-21 07:18 ~ 2020-03-31 00:18  
2311
그누보드   6453  2019-01-16 18:41 ~ 2019-01-17 19:01  
2310
etc쇼핑몰   6539  2019-01-15 04:30 ~ 2022-04-21 02:59  
2309
etc보드   6234  2019-01-15 04:26 ~ 2019-01-15 05:04  

검색

해피정닷컴 정보

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

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