masonry

When two labels show side by side with using the Masonry, how to make the width of each label show depending on its content?

你。 提交于 2019-12-11 23:07:23
问题 I want to use the Masonry to show two labels (UILabel) in the a line (view). But the left label is much wider than the right one. They shows like that in this picture.(The green label and yellow label.) The content compression of them are UILayoutPriorityRequired, I want the left side of the left label is equal to its superview and the right side of the right label is equal to its superview. Then how to make the width of each label show depending on its content with even more labels in a view

Masonry.js – Items not moving vertically

左心房为你撑大大i 提交于 2019-12-11 22:37:46
问题 I don't know how to explain this without an image. Please take a look. I'm fairly sure I've done everything correctly, but for some reason the divs are not moving down. Here's my code: HTML <div id="gallery-container" class="js-masonry" data-masonry-options='{ "columnWidth": ".gallery-column-sizer", "gutter": ".gallery-gutter-sizer", "itemSelector": ".gallery-item" }'> <div class="gallery-column-sizer"></div><div class="gallery-gutter-sizer"></div> <div class="gallery-item"><a href=""><img

Cannot initialize Masonry with JQuery

给你一囗甜甜゛ 提交于 2019-12-11 18:35:09
问题 According to the official documentation there are different ways to initialize the masonry container. The HTML initialization works fine, but when I try to move the parameters from the data-masonry attribute to JQuery, things break. Here is the HTML initialization with the JSON params. <div id="container" class="masonry js-masonry" data-masonry-options='{ "columnWidth": ".grid-sizer", "itemSelector": ".item", "isFitWidth": true }'> And then this is what it currently looks like when I move

Masonry layout does not adjust consistently

旧时模样 提交于 2019-12-11 13:25:20
问题 Clicking each "more" button (which becomes "less") from left to right, the tiles don't reorganize correctly when clicking the button for the last tile of the first row until the window is resized (even by a tiny bit). initLayout:true and resize:true are enabled by default but even when explicitly setting them again when toggle() runs did not solve the problem. I initialize my grid both when the page loads and when toggle() runs: jQuery('.grid').masonry({itemSelector: '.tex-entry'}); Ok so far

Masonry plugin vertical gaps

醉酒当歌 提交于 2019-12-11 03:00:03
问题 I am trying to add pinterest-like item style to my gallery, but getting huge gaps between my thumbnails. Found several similar questions on SO, but none of them helped with my situation, unfortunately. script $('#container').masonry({ itemSelector: '.container', columnWidth : 100 }); gallery <div id="container"> <div class="item">...</div> </div> styles .item { width: 122px; margin: 5px; float: left; background-color: gray; } http://jsfiddle.net/D7QQU/44/ Thanks in advance 回答1: Here's a

Anchors to pages with Masonry layouts

狂风中的少年 提交于 2019-12-11 02:52:18
问题 Since I first posted this issue, I have decided upon an approach but either it is just plain wrong or improperly implemented. ISSUE I have several pages containing div content and using jQuery Masonry for the layout. These pages have cross referencing links via anchors pages. E.g the fifth content div on page A links to an anchor on the ninth div on page B. The issue is the anchor positions don't properly exist until Masonry finishes - i.e. the anchors work fine with Masonry turned off, but

How do I get a script to load before masonry?

試著忘記壹切 提交于 2019-12-11 02:14:42
问题 I'm quite new to javascript so bear with me if this is described quite horribly... I'm sure there's a simple solution if someone could take the time to check this code for me: http://nang-nang.net/masonry/index.html ^My test site I'm trying to use Masonry but unloaded images are causing elements to overlap. There is a solution provided (in the Masonry appendix page) called ImagesLoaded, which I tried, but I couldn't get it to work. Then I thought, ImagesLoaded might not be working because the

Masonry overlapping issue

 ̄綄美尐妖づ 提交于 2019-12-11 01:15:41
问题 I am trying to use David DeSandro's Masonry on my blog posts and I have an anoying issue where the containers overlap. As soon as I re-size my browser window, everything works fine: <!--The code I placed in my template head section:--> <script src='http://desandro.github.io/imagesloaded/imagesloaded.pkgd.min.js'/> <script src='http://masonry.desandro.com/masonry.pkgd.min.js'/> <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js' type='text/javascript'/> <b:if cond=

HTML5 Masonry Margin / Gutter Issue when using fixed Sidebar (EDGE & Firefox)

为君一笑 提交于 2019-12-10 11:47:14
问题 I'm attempting to setup a Masonry Wall with a design that uses a fixed sidebar menu layout, it works to some degree but it is adding a bottom gutter, which resolves after resizing the viewpoint. This issue only seems to occur when using Firefox and Edge, Chrome seems to work fine. This practical error certainly seems to be doing is doing the rounds on Stack Overflow. Most of these issues listed on Stack Overflow are resolved by ensuring that the masonry is fired after the page load to

jquery help - initialize Masonry after all images have loaded

六眼飞鱼酱① 提交于 2019-12-10 04:23:01
问题 I am using a masonry plugin but my images are overlapping when the page first loads. If I change the width of the browser they fall into place. The developer told me to do the following but I am unsure how to "add it: to my custom.js file properly. I was just told to: // with jQuery var $container = $(’#container’); // initialize Masonry after all images have loaded $container.imagesLoaded(function(){ $container.masonry(); }); Can anyone properly format this advice so I can use it? 回答1: He