8.16. Foundation Tab

发布时间 :2025-10-25 12:24:34 UTC      

Tab navigation can well display different content, and can switch the content.

Tab u <ul class="tabs" data-tab> To create, each option uses the < li > element and adds .tab-title Class to create.

提示: The currently selected item can be used .active Class.

8.16.1. Example

<ul class="tabs" data-tab>
  <li class="tab-title active"><a href="#">Home</a></li>
  <li class="tab-title"><a href="#">Menu 1</a></li>
  <li class="tab-title"><a href="#">Menu 2</a></li>
  <li class="tab-title"><a href="#">Menu 3</a></li>
</ul>

尝试一下 »

Vertical tab

Vertical tabs can be used .vertical Class:

8.16.2. Example

<ul class="tabs vertical" data-tab>

尝试一下 »

Toggle Tab

If you want to set the toggle tag, you can use the < div > element to add .content Class. Add a unique ID to each tab and connect to the list item (< a href= “# menu1” will open the option content of id= “menu1”). Finally, put all the options in the <div> Element, the <div> Element needs to be added .tabs-content Class and initialize the Foundation JS.

Be careful .active Class is automatically added to the currently selected tab:

8.16.3. Example

<ul class="tabs" data-tab>
  <li class="tab-title active"><a href="#home">Home</a></li>
  <li class="tab-title"><a href="#menu1">Menu 1</a></li>
  <li class="tab-title"><a href="#menu2">Menu 2</a></li>
  <li class="tab-title"><a href="#menu3">Menu 3</a></li>
</ul>
<div class="tabs-content">
  <div class="content active" id="home">
    <h3>HOME</h3>
    <p>Home is where the heart is..</p>
  </div>
  <div class="content" id="menu1">
    <h3>Menu 1</h3>
    <p>Some text, blabla</p>
  </div>
  <div class="content" id="menu2">
    <h3>Menu 2</h3>
    <p>Some other text.</p>
  </div>
  <div class="content" id="menu3">
    <h3>Menu 3</h3>
    <p>Last tab.</p>
  </div>
</div>
<!-- Initialize Foundation JS -->
<script>
$(document).ready(function() {
    $(document).foundation();
})
</script>

尝试一下 »

Tab fade in

Use CSS to customize the effect of tab fading:

8.16.4. Example

.tabs-content > .content.active{
    -webkit-animation:fadeEffect 1s;
    animation:fadeEffect 1s;
}
@-webkit-keyframes fadeEffect{
    from{opacity:0;}
    to{opacity:1;}
}
@keyframes fadeEffect{
    from{opacity:0;}
    to{opacity:1;}
}

尝试一下 »

Principles, Technologies, and Methods of Geographic Information Systems  102

In recent years, Geographic Information Systems (GIS) have undergone rapid development in both theoretical and practical dimensions. GIS has been widely applied for modeling and decision-making support across various fields such as urban management, regional planning, and environmental remediation, establishing geographic information as a vital component of the information era. The introduction of the “Digital Earth” concept has further accelerated the advancement of GIS, which serves as its technical foundation. Concurrently, scholars have been dedicated to theoretical research in areas like spatial cognition, spatial data uncertainty, and the formalization of spatial relationships. This reflects the dual nature of GIS as both an applied technology and an academic discipline, with the two aspects forming a mutually reinforcing cycle of progress.