twitter-bootstrap

Bootstrap 4 default tab-pane active fade in not working

旧巷老猫 提交于 2020-05-26 11:29:09
问题 In the process of researching dynamic nav-tabs, I've decided to add a fade in effect when the user clicks on the tab of their choice. When the modal first loads, the following line of html makes the HOME tab appear by the fault. <div id="home" class="tab-pane active"> The above works fine but... if I replace the above with the following html code... <div id="home" class="tab-pane active fade in"> When the modal first loads, div home is not faded in . It only works once the user clicks on a

Highlight div box on hover

╄→гoц情女王★ 提交于 2020-05-25 04:44:05
问题 Say I have a div with the following attributes: .box { width: 300px; height: 67px; margin-bottom: 15px; } How would I make it so that if someone hovers their mouse over this area, it changes the background to a slightly darker colour and makes it a clickable area? 回答1: CSS Only: .box:hover{ background: blue; /* make this whatever you want */ } To make it a 'clickable' area, you're going to want to put a <a></a> tag inside the div, and you may want to use jQuery to set the href attribute.

Bootstrap carousel with fixed height: center image horizontally or vertically based on image dimensions

拥有回忆 提交于 2020-05-25 04:29:11
问题 I have a bootstrap carousel with a fixed height. Here is the CSS: .carousel-custom .carousel-outer { position: relative; } @media(min-width: 992px){ .carousel-custom { margin-top: 20px; .carousel-inner { height: auto; .item { height:500px; line-height:300px; } } } } @media(max-width: 991px){ .carousel-custom { margin-top: 20px; .carousel-inner { height: auto; .item { height:300px; line-height:300px; text-align:center; } } } } And here is my markup: <div id="carousel-custom-1188" class=

Adding bootstrap to Vue CLI project

我的梦境 提交于 2020-05-24 20:21:52
问题 I'm new to Vue and webpack in general and I'm having a hard time figuring out how to import things. I created a fresh Vue project through vue init I added bootstrap 4 with yarn add bootstrap@4.0.0-alpha.6 In main.js I try to import bootstrap and jquery: import Vue from 'vue'; import jQuery from 'jquery'; import bootstrap from 'bootstrap'; import App from './App'; import router from './router'; But I get: Uncaught Error: Bootstrap's JavaScript requires jQuery. jQuery must be included before

Bootstrap fullscreen layout with 100% height

蓝咒 提交于 2020-05-24 08:29:40
问题 I want to develop a kiosk-app which should stretch itself to 100% of the complete touch-screen. When I'm nesting for each application-view/template the rows and cols, it becomes horrible complicated to define every row and every column to set stretch 100% or less (depending on the nested element) in height. Is there a floating layout for such a case? EDIT Heres some code: <div id="mmenu_screen" class="container-fluid main_container"> <div class="row"> <div class="col-sm-6"> <div class="row">

BootstrapVue conditional column in b-table

て烟熏妆下的殇ゞ 提交于 2020-05-24 06:09:49
问题 I'd like to only show one of my columns if the current user is an admin. I'm not sure how to do this with bootstrapVue. Any ideas? 回答1: Here's a snippet based on Troy's comment. I've added a custom property to the field object called requiresAdmin . This is not part of standard Bootstrap-Vue . You can use this to filter out all the fields that require's the user to be an admin in a computed property. Based on whether the user is an admin or not. This makes it easy to add and remove fields

Create responsive Bootstrap navbar with two rows

ⅰ亾dé卋堺 提交于 2020-05-22 21:04:57
问题 I am trying to create a responsive Bootstrap 3 based navbar with two rows. However, I am having trouble with the structure of the HTML and the collapse functionality. Below is a visual description of the desired result, and I was hoping someone could point me in the right direction in terms of HTML/CSS (with as much default Bootstrap functionality as possible). Essentially the menu is desired to do the following: On tablet/desktop devices, the first row is the logo and a menu of small

jquery bootstrap modal closing after swal alert

纵然是瞬间 提交于 2020-05-18 01:52:55
问题 I have this code here I am trying to close bootstrap modal after swal is clicked ok: swal({ title:'', text:'Thanks, we will contact you !', type: 'success' }); $("#modal").on('hidden.bs.modal', function () { alert('boo'); $(this).data('bs.modal', null); }).trigger(); Nothing is happening, not even alert , only if I click the close button on the modal, it shows an alert and closes. 回答1: You should use the .then() method which accepts a callback function, in that callback you'd close the modal.

jquery bootstrap modal closing after swal alert

徘徊边缘 提交于 2020-05-18 01:52:05
问题 I have this code here I am trying to close bootstrap modal after swal is clicked ok: swal({ title:'', text:'Thanks, we will contact you !', type: 'success' }); $("#modal").on('hidden.bs.modal', function () { alert('boo'); $(this).data('bs.modal', null); }).trigger(); Nothing is happening, not even alert , only if I click the close button on the modal, it shows an alert and closes. 回答1: You should use the .then() method which accepts a callback function, in that callback you'd close the modal.

How can i load panel by id?

拥有回忆 提交于 2020-05-17 06:15:49
问题 I have two panel rpspanel and sppanel Panel how can i show or hide them based on the selected list ID? I have this list: <ul id="list" style="line-height: 0.01;"> @foreach (var item in compInfo) { <li data-expanded="false" class="panel-handler" data-id="@item.ID">@item.CompanyName @foreach (var scontractor in item.SubContractor) { <ul> <li class="panel-handler" data-expanded="true" data-id="@subcontractor.ID">@scontractor.Name</li> </ul> } </li> } </ul> On <li> list click i want to hide or