nav

Can I use <nav> tag for list of article tags?

只愿长相守 提交于 2019-12-20 04:52:03
问题 After the article I have list of tags related to article. Is it semantically correct to wrap list of those tags in <nav> html tag? If no, what would be the proper one? <nav class="tags"> Tags: <ul> <li><a href="#">Tag1</a></li> <li><a href="#">Tag2</a></li> <li><a href="#">Tag3</a></li> </ul> </nav> MDN states: Not all links of a document must be in a <nav> element, which is intended only for major block of navigation links; typically the <footer> element often has a list of links that don't

Bootstrap 4.0 - Two NavBars that collapse into one toggle [duplicate]

谁说胖子不能爱 提交于 2019-12-17 21:26:16
问题 This question already has answers here : Bootstrap 4 collapsing two navbars into one toggle button (2 answers) Closed last year . Wondering if it's possible to have two navigation bars displaying on separate rows on desktop, but have the two navbars collapse into one toggler on tablet and mobile. Essentially, I want the top navbar to contain the brand, and then four or five menu items, while the second navbar would not contain a brand but instead just four or five more navigation elements. I

How do I add a data-offset to a Bootstrap 4 fixed-top responsive navbar?

一世执手 提交于 2019-12-17 19:57:10
问题 So, in Bootstrap v3, you would just add a data-offset attribute to the nav tag, with the pixel offset, in this case 54px, <nav data-offset="54"></nav> However, in Bootstrap v4, this data-offset attribute is missing, and doesn't work. I've had a look through the v4 docs, and just can't seem to find anything! I've also tried using data-offset and offset attributes, but these don't work either. Here is the html code of the nav <nav class="navbar navbar-light bg-faded navbar-fixed-top"> <button

How to set Bootstrap navbar “active” class in Angular 2?

浪尽此生 提交于 2019-12-17 17:35:03
问题 How can I set Bootstrap navbar "active" class in Angular 2? I only found Angular 1 way. When I go to About page, add class="active" to About , and remove class="active" on Home . <ul class="nav navbar-nav"> <li class="active"><a [routerLink]="['Home']">Home</a></li> <li><a [routerLink]="['About']">About</a></li></li> </ul> Thanks 回答1: If you use the new 3.0.0. component router ( https://github.com/angular/vladivostok ) you can use the routerLinkActive directive. No further javascript required

Make a nav bar stick to the top when scrolling with css

老子叫甜甜 提交于 2019-12-17 10:18:27
问题 I am trying to make my nav bar move with the page but stick to the top if the user scrolls down. Could anyone provide any examples or how to? Much appreciated. (I'm hopeless in any other language). I tried using the css sticky but it didn't work. <div class="headercss"> <div class="headerlogo"></div> <div class="nav"> <ul> <li><a href="#home"> <br>BLINK</a></li> <li><a href="#news"><br>ADVERTISING WITH BLINK</a></li> <li><a href="#contact"><br>EDUCATING WITH BLINK</a></li> <li><a href="#about

前端——模拟简书首页静态实现

家住魔仙堡 提交于 2019-12-17 08:10:25
目标: 实现简书首页的静态展示 效果: 代码 : html < ! DOCTYPE html > < html lang = "en" > < head > < meta charset = "UTF-8" > < title > 简书 - 创作你的创作 < / title > < link rel = "shortcut icon" href = "favicon.ico" type = "image/x-icon" > < link rel = "stylesheet" href = "css/index.css" > < meta name = "keywords" content = "简书,简书官网,图文编辑软件,简书下载,图文创作,创作软件,原创社区,小说,散文,写作,阅读" > < meta name = "description" content = "简书是一个优质的创作社区,在这里,你可以任性地创作,一篇短文、一张照片、一首诗、一幅画……我们相信,每个人都是生活中的艺术家,有着无穷的创造力。" > < / head > < body > < ! -- 头部导航 -- > < nav id = "nav" > < div class = "nav-content" > < ! -- 左边 -- > < div class = "nav-content-l" > <

32.纯 CSS 创作六边形按钮特效

和自甴很熟 提交于 2019-12-16 16:04:39
原文地址: https://segmentfault.com/a/1190000015020964 感想:简简单单的动画特效,位置,动画。 HTML代码: <nav> <ul> <li>Home</li> <li>Products</li> <li>Services</li> <li>Contact</li> </ul> </nav> <nav> <ul> <li>Home</li> <li>Products</li> <li>Services</li> <li>Contact</li> </ul> </nav> <nav> <ul> <li>Home</li> <li>Products</li> <li>Services</li> <li>Contact</li> </ul> </nav> CSS代码: html, body { margin: 0; padding: 0; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; } nav{ --h: 3em; } nav:nth-child(1){ --rate: 1.5; --bgcolor: black; } nav:nth-child(2){ --rate: 1.732; --bgcolor:

ionic 2 sidemenu - navCtrl inside a component

故事扮演 提交于 2019-12-14 03:23:26
问题 I'm using the ionic 2 starter template with sidemenu. So the original app.html looks like this <ion-menu [content]="content"> <ion-toolbar> <ion-title>Menu</ion-title> </ion-toolbar> <ion-content> <ion-list> <button menuClose ion-item *ngFor="let p of pages" (click)="openPage(p)"> {{p.title}} </button> </ion-list> </ion-content> </ion-menu> <ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav> and I want to replace the menu content with a component like this <ion-menu

responsive fixed-top navbar when expanded fills up screen, hides some of the nav-links, and does not scroll

╄→гoц情女王★ 提交于 2019-12-14 03:16:42
问题 I have created a fixed-top bootstrap 4 navbar that is expanded on large screens, and collapsed on the others. I have also added padding-top to the <body> to prevent the navbar from overlapping the main body content. However, on smaller screens when the collapsed navbar is expanded using the hamburger button, it expands and fills the screen. Some of the nav-links then become hidden (i.e. outside the display). Moreover,scrolling does not scroll the navbar, but only the main body content which

Creating a dropdown list item menu with CSS only

孤街浪徒 提交于 2019-12-13 21:45:46
问题 In a section of website I'm working on I have a NAV element that contains three sections: About, Portfolio, Contact. I'm trying to make it so that when you hover over the Portfolio section, a drop down appears allowing you to choose between two other sections, "Writing Samples" and "Photoshop." I am trying to accomplish this using only CSS. This is my HTML section: <nav> <ul> <li> <a href="index.html" >About</a> </li> <li class="subNav"> <a class="selected" >Portfolio</a> <ul> <li><a href=