问题描述
我有一个充满动态文本的 c> $ 标记在列内容的结尾处,并使用 .position() >相对于父容器的位置,并添加一个 -webkit-column-width (因为 .position()告诉您到< span> 的左坐标的距离。
Here's the idea: you insert a blank <span> tag at the end of your column content and use .position() to grab its left position relative to the parent container, and add one -webkit-column-width (because .position() only tells you the distance to the left coordinate of the <span>).
这里有一个小小的怪癖,我不明白。要获得正确的宽度,还必须减去一个 -webkit-column-gap 。在我看来, .position()。left 和容器的边缘之间的距离应该只是最后一列的宽度, -webkit -column-width 。任何人都可以解释这一个吗?我只是在数学坏吗?
Here's a little quirk that I don't understand. To get the correct width, you also have to subtract one -webkit-column-gap. In my mind, the distance between .position().left and the edge of the container should only be the width of the final column, -webkit-column-width. Can anyone explain this one? Am I just bad at math?
对不起,如果插件代码马虎;我的jQuery的经验是有限的:)
Sorry if the plugin code is sloppy; my experience with jQuery is limited :)
(需要的信用:想法改编自)
(Credit where it's due: idea adapted from How to Get CSS3 Multi-Column Count in Javascript.)
这篇关于确定动态CSS3的宽度多列DIV宽度固定列宽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!