bootstrap-4

Bootstrap 4: Accordion does not collapse cards

江枫思渺然 提交于 2020-04-16 02:58:08
问题 From the official documentation of Bootstrap 4, there is this following code. What should I do in order to not collapse other cards if I open/show one. I want all the cards shown/open initially then the user will just select which card he want to collapse/close. <div id="accordion"> <div class="card"> <div class="card-header" id="headingOne"> <h5 class="mb-0"> <button class="btn btn-link" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">

Bootstrap 4 - How to make fixed-top navbar disappear on scroll

╄→尐↘猪︶ㄣ 提交于 2020-04-11 15:23:53
问题 With Bootstrap 4, how can I make the fixed-top navbar disappear on scroll? I've attached below the html code for the default Bootstrap 4 navbar. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top"> <a class="navbar-brand" href="#">Test</a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault

Bootstrap 4 - How to make fixed-top navbar disappear on scroll

十年热恋 提交于 2020-04-11 15:21:58
问题 With Bootstrap 4, how can I make the fixed-top navbar disappear on scroll? I've attached below the html code for the default Bootstrap 4 navbar. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top"> <a class="navbar-brand" href="#">Test</a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault

Bootstrap 4 - How to make fixed-top navbar disappear on scroll

喜你入骨 提交于 2020-04-11 15:21:02
问题 With Bootstrap 4, how can I make the fixed-top navbar disappear on scroll? I've attached below the html code for the default Bootstrap 4 navbar. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top"> <a class="navbar-brand" href="#">Test</a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault

How to properly handle Navbar color change on Scroll in Angular?

安稳与你 提交于 2020-04-07 03:47:51
问题 I'm making a project in angular. I would like to add a navbar which have transparent background initially but on scroll it will change its color. I am using bootstrap classes for that My Navbar heading is html code: <nav class="navbar navbar-expand-md sticky-top"> ... </nav> where can I add my Script to change its color on Scroll 回答1: import { HostListener } from '@angular/core'; You can achieve this with @HostListner in your Typescript file. @HostListener('window:scroll', ['$event'])

Bootstrap 4 - Fullscreen mobile navbar

£可爱£侵袭症+ 提交于 2020-04-05 12:31:41
问题 I'm trying to figure out how I can do a fullscreen menu (navbar) on mobile size, with this I mean that when you press on the 'hamburger-menu' the navbar (with the items) should occupy all the viewport. I achieved this just writing: #navbarText{ height: 100vh; } But the bootstrap animation isn't smooth like the default one, as you can see here (normally the animation increase the div size gradually and vice-versa when you close it): Here the code: /*---Standar Hamburger Menu (3 separate

Bootstrap 4 - Fullscreen mobile navbar

大憨熊 提交于 2020-04-05 12:23:09
问题 I'm trying to figure out how I can do a fullscreen menu (navbar) on mobile size, with this I mean that when you press on the 'hamburger-menu' the navbar (with the items) should occupy all the viewport. I achieved this just writing: #navbarText{ height: 100vh; } But the bootstrap animation isn't smooth like the default one, as you can see here (normally the animation increase the div size gradually and vice-versa when you close it): Here the code: /*---Standar Hamburger Menu (3 separate

Bootstrap 4 - How to hide a container on laptop and smaller but show it on desktop

孤者浪人 提交于 2020-03-28 06:38:29
问题 I am developing the header of a website. The searchbar looks like this in full hd desktop: But on laptop view (width: 1280px) it looks like this: So I try to hide the last column for laptop view and smaller views, but there seems to be no way, since Extra large is defined as >= 1200px and my laptop screen is 1280px width. Why is my tiny laptop screen already considered as "Extra large" ? Bootstrap claims to be a "mobile first" framework. However, judging from the breakpoints, it's a mobile

Customizing Navbar

生来就可爱ヽ(ⅴ<●) 提交于 2020-03-24 14:19:51
问题 I'm trying to design my navbar for my site, to be used in desktop and mobile mode. I've created a JS Fiddle here This the html so far: <div class="container-fluid"> <nav class="navbar navbar-expand-sm navbar-light"> <a class="navbar-brand" href="#">Navbar</a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"><

How to include a Form inside a Popover using Bootstrap 4.3?

五迷三道 提交于 2020-03-23 05:15:38
问题 I am trying to include a form inside a Popover, created using Bootstrap 4.3, Popper.js and jQuery 3. The latest version of each. The problem is that it works with text, it works with tags, but as soon as I use forms, labels and inputs it doesn't parse the HTML. I have two examples in CodePen: Everything via data-attributes: link Via JS: link Example 1 code HTML: <div class="container"> <div class="row"> <div class="col-12 mt-5"> <h1>Bootstrap 4 form in popover</h1> <hr> </div> </div> <div