TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Facebook-Like Modal Library - Now supports mobile

25 点作者 mikesilvis将近 12 年前

5 条评论

bzalasky将近 12 年前
Facebook uses display: table for their modal so that they can center it vertically without worrying about JS (if the height is variable and/or unknown) or negative margins. As far as making it responsive, you just need to work on your styles a bit. Check out the image detail modal I made for Stipple.com (just click on an image in the feed). This implementation leans on Backbone.js a little bit, but for the most part, the markup and styles make up a majority of the library. The actual plugin just builds the dom elements, handles events, and provides callbacks.
Terretta将近 12 年前
Thanks for sharing this.<p>On iPad, starting portrait and rotating landscape redraws but same size (too small). Starting landscape and rotating portrait tries to redraw same size (too large) but breaks layout, pushing text below image.<p>I feel as though portrait mode on iPad might look better with white box below the otherwise extremely tiny image.<p>Looks fantastic on desktop Safari.
评论 #6218279 未加载
doughj3将近 12 年前
Was confused for a moment, though this had something to do with &quot;Likes&quot; on Facebook. Just a small note, but should be Facebook-like, eh?
评论 #6219628 未加载
cmancini将近 12 年前
I actually needed something exactly like this yesterday, and was having issues getting Bookstrap&#x27;s modal to do what I wanted. Thanks!
评论 #6219017 未加载
jeffehobbs将近 12 年前
Very nice!