bootstrap-5

How to create jumbotron in Bootstrap 5?

天涯浪子 提交于 2021-02-16 13:33:30
问题 In Bootstrap 5 the jumbotron component is removed in favor of utility classes like .bg-light for the background color and .p-* classes to control padding. I'm a newbie, can somebody give example of how to do that? 回答1: The migration documents give you exactly what you need to know. In v4.x Bootstrap's .jumbotron component is literally just this: .jumbotron { padding: 2rem 1rem; margin-bottom: 2rem; background-color: #e9ecef; border-radius: .3rem; } You can, with the exception of the specific

How to create jumbotron in Bootstrap 5?

隐身守侯 提交于 2021-02-16 13:33:16
问题 In Bootstrap 5 the jumbotron component is removed in favor of utility classes like .bg-light for the background color and .p-* classes to control padding. I'm a newbie, can somebody give example of how to do that? 回答1: The migration documents give you exactly what you need to know. In v4.x Bootstrap's .jumbotron component is literally just this: .jumbotron { padding: 2rem 1rem; margin-bottom: 2rem; background-color: #e9ecef; border-radius: .3rem; } You can, with the exception of the specific

How can I recompile Bootstrap so that my theme color changes in _variables.scss when I am using Angular with CSS?

家住魔仙堡 提交于 2021-02-11 12:38:06
问题 So far I have found the SCSS file node_modules/bootstrap/scss/_variables.scss to change the primary color for example and I have stopped npm and run the front-end again but changes in that file are not shown in the actual behaviour. My guess is that it's because I need to recompile Bootstrap but as I have never used SCSS and my Angular project uses CSS I have no idea nor I could find an easy explanation on how to achieve this. Thanks in advance ! 回答1: TODO: create a variable.scss file in your

Bootstrap 5 navbar align items right

痞子三分冷 提交于 2021-02-04 17:35:27
问题 How do you align Bootstrap 5 navbar items to the right? In Bootstrap 3 it's navbar-right . In Bootstrap 4 it's ml-auto . But not work for Bootstrap 5. 回答1: This question was asked for Bootstrap 5 alpha , and therefore ml-auto should still work. As of Bootstrap 5 beta (Dec 2020), left and right have been replaced by start and end for RTL support. Therefore the margin utilities changed for Bootstrap 5 beta: ml-auto => ms-auto mr-auto => me-auto Align nav items to right in Bootstrap 5 回答2: You

Navbar dropdown Menu is not working in Bootstrap 5

ⅰ亾dé卋堺 提交于 2021-02-02 02:04:06
问题 I am facing a issue when trying to create a responsive menu or dropdown button with Bootstrap 5 .Everything seems ok.The navigation icon & dropdown icon apears.But its not working.When I clicked the nav icon or dropdown button,no dropdown menu apears. I want to specially mention that I also included the jquery file. But it didn't work. Can anyone please tell me what is happening here? One last thing,I faced severel issues with some others bootstrap classes like mr-auto , ml-auto etc.Is it any

How to change choose file text bootstrap 5

限于喜欢 提交于 2021-01-29 09:16:43
问题 Is it impossible change choose file text of input file in bootstrap 5 using css like bootstrap 4? and how can I add a margin to no file chosed? 回答1: Bootstrap 5 beta no longer provides a custom file input like Bootstrap 4 that used pseudo elements to override the browser's file input defaults. Therefore you'd have to use JS or make your own psuedo element to hide the Choose file .. area of the input... #formFile::before { content: "Pick file"; position: absolute; z-index: 2; display: block;

Using Bootstrap 5 with Vue 3

♀尐吖头ヾ 提交于 2021-01-27 16:29:04
问题 I want to use Bootstrap 5 with Vue 3. As Bootstrap 5 uses vanilla JS (no JQuery), can I use Bootstrap 5 directly in a Vue 3 project (without using Bootstrap-Vue)? Can someone guide me how to use Bootstrap 5 with Vue 3? 回答1: Install bootstrap as you would any other JS module in the Vue project using npm install or by adding it to the package.json . Then, the simplest way to use Bootstrap components is via the data-bs- attributes. For example here's the Bootstrap Collapse component... <button

Align nav items to right in Bootstrap 5

喜夏-厌秋 提交于 2021-01-09 09:39:49
问题 I have copied a navbar HTML code from https://www.codeply.com/go/qhaBrcWp3v Example 6: <nav class="navbar navbar-expand-lg navbar-light bg-light"> <div class="d-flex flex-grow-1"> <span class="w-100 d-lg-none d-block"><!-- hidden spacer to center brand on mobile --></span> <a class="navbar-brand d-none d-lg-inline-block" href="#"> Navbar 6 </a> <a class="navbar-brand-two mx-auto d-lg-none d-inline-block" href="#"> <img src="//placehold.it/40?text=LOGO" alt="logo"> </a> <div class="w-100 text

Align nav items to right in Bootstrap 5

人盡茶涼 提交于 2021-01-09 09:37:20
问题 I have copied a navbar HTML code from https://www.codeply.com/go/qhaBrcWp3v Example 6: <nav class="navbar navbar-expand-lg navbar-light bg-light"> <div class="d-flex flex-grow-1"> <span class="w-100 d-lg-none d-block"><!-- hidden spacer to center brand on mobile --></span> <a class="navbar-brand d-none d-lg-inline-block" href="#"> Navbar 6 </a> <a class="navbar-brand-two mx-auto d-lg-none d-inline-block" href="#"> <img src="//placehold.it/40?text=LOGO" alt="logo"> </a> <div class="w-100 text

VS code CSS class selector not found with angular and bootstrap 5 beta

断了今生、忘了曾经 提交于 2020-12-29 03:56:53
问题 I'm using bootstrap 5 with angular, and I add style and script to angular.json but the problem in VS Code It does not recognize the bootstrap classes Thanks 回答1: Uninstall this extension named "HTML CSS Support" and then reload. It worked for me, I hope it would work for you as well. 回答2: Install this extension https://marketplace.visualstudio.com/items?itemName=ecmel.vscode-html-css Then in your .vscode/settings.json: { "css.styleSheets": [ "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0beta1