草庐IT

flex-item

全部标签

html - 内部带有长文本的 Flex 网格元素

我有一个3列的flex布局,你可以在这个fiddle中看到有什么方法可以让flex元素省略或打断这个长文本?正如您在第一栏中看到的,我有一个很长的词,如果您调整预览窗口的大小,该栏将打破3栏布局。还有其他解决方案吗?代码(同fiddle)HTML:LONGSTRINGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGTestTestTestTestTestTestTestTestTestTestTestTestENDCSS:.container{display:flex;flex-wrap:no-wrap;flex-direction:row;just

html - 使用 Flexbox 时顶部被切断

我正在使用flexbox来布局div的。当我在div中有很多li的时,(每个li的宽度为100%/3)顶部被切断.于是上网查了下,说是在div里面插入margin:auto。当我这样做时,我遇到了一个新问题。让我告诉你:使用margin:autonot应用:body,html{height:100%;margin:0;padding:0;}#outerWrapper{background-color:aqua;height:100%;display:flex;justify-content:flex-start;/*Thisisignored*/align-items:center;o

html - 使用 Flexbox 时顶部被切断

我正在使用flexbox来布局div的。当我在div中有很多li的时,(每个li的宽度为100%/3)顶部被切断.于是上网查了下,说是在div里面插入margin:auto。当我这样做时,我遇到了一个新问题。让我告诉你:使用margin:autonot应用:body,html{height:100%;margin:0;padding:0;}#outerWrapper{background-color:aqua;height:100%;display:flex;justify-content:flex-start;/*Thisisignored*/align-items:center;o

css - polymer 1.2 : Change paper-item selected background colour

我搜索了我的问题并找到了this但是,公认的解决方案对我不起作用,但我无法发表评论,因为我只有6声望-.-情况是,我想使用paper-item来自paper-listbox中的Polymer框架这行得通,但是当您通过单击选择一个元素时,背景会变为灰色...文档和我链接的问题的答案abvoe建议覆盖--paper-item-selected/--paper-item-focusmixin,但这对我不起作用我的代码:.spacer{@apply(--layout-flex);}paper-item{--paper-item-selected:{background-color:#FFFFF

css - polymer 1.2 : Change paper-item selected background colour

我搜索了我的问题并找到了this但是,公认的解决方案对我不起作用,但我无法发表评论,因为我只有6声望-.-情况是,我想使用paper-item来自paper-listbox中的Polymer框架这行得通,但是当您通过单击选择一个元素时,背景会变为灰色...文档和我链接的问题的答案abvoe建议覆盖--paper-item-selected/--paper-item-focusmixin,但这对我不起作用我的代码:.spacer{@apply(--layout-flex);}paper-item{--paper-item-selected:{background-color:#FFFFF

html - 为什么百分比宽度大小的 flex box 元素不能正确增加具有未指定(即自动)宽度的包装表的宽度?

请看一下这个片段:table{background-color:yellow;box-shadow:inset001pxred;max-width:100%;/*Youwouldgetsimilarlystrangebehaviorwithcollapsingborders:*//*border-collapse:collapse;*/}td{background-color:lightgreen;box-shadow:inset001pxblue;max-width:100%;}.flex{max-width:100%;display:flex;flex:1;background-c

html - 为什么百分比宽度大小的 flex box 元素不能正确增加具有未指定(即自动)宽度的包装表的宽度?

请看一下这个片段:table{background-color:yellow;box-shadow:inset001pxred;max-width:100%;/*Youwouldgetsimilarlystrangebehaviorwithcollapsingborders:*//*border-collapse:collapse;*/}td{background-color:lightgreen;box-shadow:inset001pxblue;max-width:100%;}.flex{max-width:100%;display:flex;flex:1;background-c

html - 两个带有空白 :nowrap elements inside a flex container 的 50% div

我想要一个包含两个50%宽度子div的父div,子div随内容调整大小。其中一个有一个带有white-space:nowrap;的h3,这会导致div增长超过50%。我可以使用min-width:0;强制div返回到50%宽度,但是h3现在溢出了。所以我要么在子div上获得不同的宽度,要么在其中一个div中从h3溢出。是否有可能使它们具有相同的50%宽度,即使是内部有white-space:nowrap;的元素?在这里查看问题:http://codepen.io/anon/pen/VjPwLm?editors=1100#parent{background:whitesmoke;disp

html - 两个带有空白 :nowrap elements inside a flex container 的 50% div

我想要一个包含两个50%宽度子div的父div,子div随内容调整大小。其中一个有一个带有white-space:nowrap;的h3,这会导致div增长超过50%。我可以使用min-width:0;强制div返回到50%宽度,但是h3现在溢出了。所以我要么在子div上获得不同的宽度,要么在其中一个div中从h3溢出。是否有可能使它们具有相同的50%宽度,即使是内部有white-space:nowrap;的元素?在这里查看问题:http://codepen.io/anon/pen/VjPwLm?editors=1100#parent{background:whitesmoke;disp

html - 如果前一个兄弟 float ,则 Flex 容器溢出

如果前一个兄弟被设置为宽度为100%的float并且后面的兄弟被设置为display:flex,则后者溢出父容器而不是wrap换行。对于除flex(或grid)之外的任何其他display值,它都会按原样包装,所以为什么它不会设置为flex.float-left{float:left;width:100%;}.display-flex{display:flex;background:yellow;}/*Democss*/.container{max-width:80%;margin:auto;background:white;}I'mfloatingleft,withawidthof1