.ec-base-tab { position:relative; } .ec-base-tab .menu { margin:0 0 20px; border:1px solid #cbcdce; border-bottom-color:#202020; border-left:0; background:#f2f2f2; box-sizing:border-box; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; } .ec-base-tab .menu:after { content:""; display:block; clear:both; } .ec-base-tab .menu li { float:left; border-left:1px solid #cbcdce; background:#f2f2f2; } .ec-base-tab .menu li a { display:block; min-width:187px; margin:0 0 0 -1px; padding:12px 5px 11px; border-right:1px solid #cbcdce; color:#707070; text-decoration:none; outline:0; text-align:center; background:#f2f2f2; } .ec-base-tab .menu li:first-child a { margin-left:0; } .ec-base-tab .menu li.selected a { position:relative; top:-1px; left:-2px; margin:0 0 -1px; border:1px solid #202020; border-bottom:0; color:#fff; font-weight:bold; background:#4a5164; } .ec-base-tab .menu li.selected:first-child a { left:-1px; } .ec-base-tab > .right { position:absolute; top:8px; right:10px; line-height:24px; color:#909090; } /* typeLight */ .ec-base-tab.typeLight .menu li.selected a { margin:0 0 -2px; border-bottom:1px solid #fff; color:#404040; background:#fff; } /* grid (2~7) */ .ec-base-tab[class*="grid"] .menu { display:table; table-layout:fixed; width:100%; } .ec-base-tab[class*="grid"] .menu li { float:none; display:table-cell; vertical-align:middle; } .ec-base-tab[class*="grid"] .menu li a { display:inline-block; width:100%; min-width:0; margin:0; padding:11px 0; border:0; } .ec-base-tab[class*="grid"] .menu li.selected { position:relative; top:0; right:-1px; border:1px solid #292929; border-bottom:0; background:#4a5164; } .ec-base-tab[class*="grid"] .menu li:first-child.selected { right:0; } .ec-base-tab[class*="grid"] .menu li.selected a { position:static; background:none; } .ec-base-tab.grid2 .menu li { width:50.5%; } .ec-base-tab.grid3 .menu li { width:34%; } .ec-base-tab.grid4 .menu li { width:25.5%; } .ec-base-tab.grid5 .menu li { width:20.5%; } .ec-base-tab.grid6 .menu li { width:17%; } .ec-base-tab.grid7 .menu li { width:14.8%; width:15% \0/; } .ec-base-tab.grid7 .menu li:first-child { width:13% \0/; }
Each tab has a minimum width of 168px, and up to 4 tabs can be used.
Tab’s width will also change depending on the length of the text.
Page movement for default type is synchronous.
Refer to ‘Move content on page’ for asynchronous loading.
xxxxxxxxxx
<div class="ec-base-tab">
<ul class="menu">
<li class="selected"><a href="#none">Tab1</a></li>
<li><a href="#none">Tab2</a></li>
</ul>
</div>
Uses same structure as default type, but the selected tab color is different.
Similarly, line type tabs can also use the adjustable-width type grid class.
xxxxxxxxxx
<div class="ec-base-tab typeLight">
<ul class="menu">
<li class="selected"><a href="#none">Tab button 1</a></li>
<li><a href="#none">Tab button 2</a></li>
</ul>
</div>
Use this to arrange full-width page menus.
Vertically aligns to center when text is too long.
xxxxxxxxxx
</p>
<!--Tab (2) -->
<div class="ec-base-tab grid2">
<ul class="menu">
<li class="selected"><a href="#none">grid2</a></li>
<li><a href="#none">Tab 2</a></li>
</ul>
</div>
<!--Tab (3) -->
<div class="ec-base-tab grid3">
<ul class="menu">
<li class="selected"><a href="#none">grid3</a></li>
<li><a href="#none">Tab 2</a></li>
<li><a href="#none">Tab 3</a></li>
</ul>
</div>
<!--Tab (4) -->
<div class="ec-base-tab grid4">
<ul class="menu">
<li class="selected"><a href="#none">grid4</a></li>
<li><a href="#none">Tab 2</a></li>
<li><a href="#none">Tab 3</a></li>
<li><a href="#none">Tab 4</a></li>
</ul>
</div>
<!-- Tab (5) -->
<div class="ec-base-tab grid5">
<ul class="menu">
<li class="selected"><a href="#none">grid5</a></li>
<li><a href="#none">Tab 2</a></li>
<li><a href="#none">Tab 3</a></li>
<li><a href="#none">Tab 4</a></li>
<li><a href="#none">Tab 5</a></li>
</ul>
</div>
<!-- Tab (6) -->
<div class="ec-base-tab grid6">
<ul class="menu">
<li class="selected"><a href="#none">grid6</a></li>
<li><a href="#none">Tab 2</a></li>
<li><a href="#none">Tab 3</a></li>
<li><a href="#none">Tab 4</a></li>
<li><a href="#none">Tab 5</a></li>
<li><a href="#none">Tab 6</a></li>
</ul>
</div>
<!-- Tab (7) -->
<div class="ec-base-tab grid7">
<ul class="menu">
<li class="selected"><a href="#none">grid7</a></li>
<li><a href="#none">Tab 2</a></li>
<li><a href="#none">Tab 3</a></li>
<li><a href="#none">Tab 4</a></li>
<li><a href="#none">Tab 5</a></li>
<li><a href="#none">Tab 6</a></li>
<li><a href="#none">Text will split into two lines if it is too long</a></li>
</ul>
Add buttons or messages to your tab menus.
xxxxxxxxxx
<!--Tab menu + button-->
<div class="ec-base-tab">
<ul class="menu">
<li class="selected"><a href="#none">Tab menu1</a></li>
<li><a href="#none">Tab menu2</a></li>
</ul>
<span class="right"><a href="#none" class="btnNormal">Additional information</a></span>
</div>
<!-- Tab menu + message-->
<div class="ec-base-tab typeLight">
<ul class="menu">
<li class="selected"><a href="#none">Tab menu1</a></li>
<li><a href="#none">Tab menu2</a></li>
</ul>
<span class="right">Notification</span>
</div>
Load JS control properties for visible/hidden content.
Use this to move content inside a page.
xxxxxxxxxx
<!--Load page asynchronously: default type-->
<div class="ec-base-tab eTab">
<ul class="menu">
<li class="selected"><a href="#tabCont1_1">Tab 1</a></li>
<li><a href="#tabCont1_2">Tab2</a></li>
</ul>
<div id="tabCont1_1" class="tabCont" style="display:block;">
Content field for tab 1.
</div>
<div id="tabCont1_2" class="tabCont" style="display:none;">
Content field for tab 2.
</div>
</div>
<!--Load page asynchronously: line type-->
<div class="ec-base-tab typeLight eTab">
<ul class="menu">
<li class="selected"><a href="#tabCont1_1">Tab 1</a></li>
<li><a href="#tabCont1_2">Tab 2</a></li>
</ul>
<div id="tabCont1_1" class="tabCont" style="display:block;">
Content field for tab 1.
</div>
<div id="tabCont1_2" class="tabCont" style="display:none;">
Content field for tab 2.
</div>
</div>
We will continue to strive to provide better service.