我希望能够单击顶部栏中的链接以显示不同的内容。我是否需要在顶部栏中的每个标签上显式使用data-toggler?有没有更简单的方法来实现我想要的导航?类似于uikit的切换器?预先感谢,因为我是基金会的新手。
答案 0 :(得分:1)
您可以将下拉菜单放置在包装中,以切换其不透明度/可见性,这样当您在元素上public class TestPassByValue {
/** Main method */
public static void main(String[] args) {
// Declare and initialize variables
int num1 = 1;
int num2 = 2;
System.out.println("Before invoking the swap method, num1 is " + num1 + " and num2 is " + num2);
// invoke the swap method to attempt to swap two variables
swap(num1, num2);
System.out.println("After invoking the swap method, num1 is " + num1 + " and num2 is " + num2);
}
/** Swap two variables */
public static void swap(int n1, int n2) {
System.out.println("\tInside the swap method");
System.out.println("\t\tBefore swapping, n1 is " + n1 + " and n2 is " + n2);
// Swap n1 with n2
int temp = n1;
n1 = n2;
n2 = temp;
System.out.println("\t\tAfter swapping, n1 is " + n1 + " and n2 is " + n2);
}
:hover
时,菜单将显示在其下方或您希望放置的位置事实。
Here's the pen。
答案 1 :(得分:1)
Switcher的行为使我想起了Foundation(Tabs | Foundation for Sites 6 Docs)的tabs元素。与下拉菜单不同,即使鼠标指针移出,“ Tabs”元素在单击后仍保持可见。