flexbox

Order and stack 3 columns with bootstrap 4

烈酒焚心 提交于 2019-12-23 10:57:32
问题 I have this structure in bootstrap columns: And I want you to change to a lower resolution, be ordered as follows: I found how to do it with flexbox here: Flexbox: reorder and stack columns But I can not change the entire structure of my project to flexbox, so I want to know if with bootstrap 4, it is possible to do so. Thank you very much. My poor test. @import url( 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css' ); div { text-align: center; height: 60px; }

Order and stack 3 columns with bootstrap 4

為{幸葍}努か 提交于 2019-12-23 10:56:49
问题 I have this structure in bootstrap columns: And I want you to change to a lower resolution, be ordered as follows: I found how to do it with flexbox here: Flexbox: reorder and stack columns But I can not change the entire structure of my project to flexbox, so I want to know if with bootstrap 4, it is possible to do so. Thank you very much. My poor test. @import url( 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css' ); div { text-align: center; height: 60px; }

using a flex item as a flex container

无人久伴 提交于 2019-12-23 10:27:25
问题 I wanted to use flexbox with a column layout, but I wanted the top n - 1 flex items to be pinned to the top and the nth flex item to be pinned to the bottom of the main flex container area. I solved this by using the nth flex item to also be a new flexbox/flex container using justify-content: flex-end , but I couldn't find any examples that were doing this - so is this a correct/acceptable solution according to the standard and, if not, how would I otherwise go about this with flexbox? Here's

Which css rules are ignored when flexbox is active?

倾然丶 夕夏残阳落幕 提交于 2019-12-23 10:26:53
问题 How can I configure flexbox to have a nice fallback? Say I have this: .parent{ display: flex; flex-flow: row wrap; width: 320px; border: 1px solid black; } .children{ text-align: center; flex: 1; background: #DDD; } <div class="parent"> <div class="children">1</div> <div class="children">2</div> <div class="children">3</div> </div> What rules am I allowed to add to have a nice fallback for older browsers and that they get completly ignored and don't disturb flexbox. Notice I don't ask for a

Responsive Layout in React Native iOS

佐手、 提交于 2019-12-23 10:21:45
问题 I am about to deploy my first React Native application to the iOS app store. I am having a problem however when it comes to layout. I am utilizing the flexbox system and currently designing for iPhone 6. I have done all the mockups and Sketch and have everything how I would like it to look. I have run into a problem however whenever I try to run the application in iPhone 4. The design that I have implemented for the iPhone 6 does not fit with the constraints that iPhone 4 possesses. I can try

Make items in a flexbox take up all vertical and horizontal space

安稳与你 提交于 2019-12-23 09:17:43
问题 I currently have elements within a container, each of which contains an image. I want to distribute these into the four corners or the container, using flexbox. The images are distributing correctly horizontally, but don't take up all the available space vertically. Here's what it looks like at the moment: Here's my markup: <div class="container"> <div class="photo"> <img src="https://placehold.it/180"> </div> <div class="photo"> <img src="https://placehold.it/180"> </div> <div class="photo">

Ellipsis not working in flex container

為{幸葍}努か 提交于 2019-12-23 09:09:09
问题 I'm trying to create a layout (which will be a music player) with flex. I have 3 buttons (previous, play, and next, represented by the red squares) which I always want to be on the same line. I then have some song info (current time, song title, and total time) that I want to display to the right of the buttons. I pretty much always want the total time to be on the far right and for the song title to fill up the remaining width (with flex-grow ), but to truncate with ellipsis as the window

Get flexbox column wrap to use full width and minimize height

北城余情 提交于 2019-12-23 08:10:09
问题 I have a container with a fixed width and variable height. I'm filling the container with an unknown amount of elements. I'd like the elements to arrange themselves in columns, from top to bottom and then left to right. I could use column , but I don't know the maximum width of the child elements, so I can't set a column-width or column-count . I think display: flex with flex-flow: column wrap is the way to go, but if I maintain height: auto on the container, it will generate as a single

Z-index doesn't work with flex elements? [duplicate]

风流意气都作罢 提交于 2019-12-23 07:23:25
问题 This question already has answers here : Flexbox, z-index & position: static: Why isn't it working? (1 answer) Understanding z-index stacking order (1 answer) Closed 2 years ago . I'm trying to have two columns, one being a menu which can expand and overlap the other column. But I used a flex element to wrap these columns and my menu expands behind the other element, even with a greater z-index . The render is something like this: .main { font-family: 'Open Sans', Helvetica, sans-serif;

How can I make a flexbox parent have the width of its children?

一曲冷凌霜 提交于 2019-12-23 07:16:00
问题 I have a parent element, with two elements inside: <div class="parent"> <div class="child"> one </div> <div class="child"> two </div> </div> Currently, the .parent is 100% wide. I would like it only to be the width of the two children. .parent { display: flex; background-color: aliceblue; } How can I make the parent to be the width of it's contents, and not wider? See codepen for a live demo. 回答1: Change the parent's display from flex to inline-flex . codepen demo 来源: https://stackoverflow