All Projects → guoyunhe → flexbin

guoyunhe / flexbin

Licence: GPL-3.0 License
Pure CSS, flexible and gapless image gallery layout like Google Images and 500px.com

Programming Languages

CSS
56736 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to flexbin

React Native Responsive Grid
Bringing the Web's Responsive Design to React Native
Stars: ✭ 369 (+296.77%)
Mutual labels:  layout, flexbox, responsive-layout
Layout Demo
Various Layouts Of CSS
Stars: ✭ 264 (+183.87%)
Mutual labels:  layout, flexbox, responsive-layout
Bootstrap4Resume
A single-page static resume website created with Bootstrap 4
Stars: ✭ 36 (-61.29%)
Mutual labels:  css3, responsive-layout
vanilla-js
Projects using pure JavaScript without any external libraries or frameworks
Stars: ✭ 129 (+38.71%)
Mutual labels:  css3, flexbox
react-flex-columns
Easy layout columns for React - Using Flexbox under the hood.
Stars: ✭ 18 (-80.65%)
Mutual labels:  layout, flexbox
flexbox-carousel
CSS3 Animated Carousel with Flexbox
Stars: ✭ 23 (-75.27%)
Mutual labels:  css3, flexbox
griding
🧱 lean grid & responsive for react
Stars: ✭ 18 (-80.65%)
Mutual labels:  layout, flexbox
bootstrap4-boilerplate
A Bootstrap v4.4.1 boiler plate with sass, concatenation, minification, autoprefixer, Browsersync, hot reloading and sourcemaps all runned by Gulp
Stars: ✭ 19 (-79.57%)
Mutual labels:  css3, flexbox
flexboxes
CSS flexbox framework with pure flexbox grid ability
Stars: ✭ 27 (-70.97%)
Mutual labels:  layout, flexbox
StackViewLayout
Coming soon!
Stars: ✭ 26 (-72.04%)
Mutual labels:  layout, flexbox
bootstrap-grid-ms
Missing grid range in Bootstrap 3, micro-small from 480-767px.
Stars: ✭ 34 (-63.44%)
Mutual labels:  layout, responsive-layout
science-fiction-magazines-blog
Blog template (concept) is inspired by stylish science fiction magazines of the 80-90s.
Stars: ✭ 24 (-74.19%)
Mutual labels:  css3, responsive-layout
nice-react-layout
Create complex and nice Flexbox-based layouts, without even knowing what flexbox means
Stars: ✭ 70 (-24.73%)
Mutual labels:  layout, flexbox
how-to-css
howtocss.dev
Stars: ✭ 48 (-48.39%)
Mutual labels:  layout, flexbox
takefive.css
The most advanced pure CSS lightbox – not one single line of JavaScript has been wasted
Stars: ✭ 123 (+32.26%)
Mutual labels:  css3, pure-css
cice-playground
CICE Full Stack Web Course
Stars: ✭ 12 (-87.1%)
Mutual labels:  css3, flexbox
hangman-game
A responsive hangman game built with vanilla javascript, html, and css. Animated with GSAP and canvas animations.
Stars: ✭ 22 (-76.34%)
Mutual labels:  css3, flexbox
Katana
Katana is CSS Layout System made with Flexbox
Stars: ✭ 57 (-38.71%)
Mutual labels:  css3, flexbox
Flexy
Flexy is minimal CSS framework made with Flex
Stars: ✭ 114 (+22.58%)
Mutual labels:  css3, flexbox
Griddle
A CSS Grid Framework
Stars: ✭ 215 (+131.18%)
Mutual labels:  css3, flexbox

Flexbin

Flexible and gapless image gallery layout like Google Images and 500px.com. Based on article of xieranmaya

  • Pure CSS, no need for JavaScript or server side calculation
  • Responsive, nice look on both desktop and mobile devices
  • Gapless, all spaces between images are the same
  • Little cropping, no deformation
  • SaSS support
  • Chrome 31+, Firefox 36+, Safari 10+

Screenshot

Screenshot

Demo: https://guoyunhe.me/demo/flexbin/

Get Started

Download

  1. Download this git repo as zip or tar.gz file.
  2. NPM npm install flexbin
  3. Bower (TODO)

Import

Use flexbin.css in your HTML:

<link href="path/to/flexbin.css" type="text/css" rel="stylesheet" media="all" />

or import flexbin.scss in your SaSS project:

@import "path/to/flexbin.scss";

Markup

HTML markup is very simple:

<div class="flexbin">
    <a href="product/1.html">
        <img src="images/1.jpg" />
    </a>
    <a href="product/2.html">
        <img src="images/2.jpg" />
    </a>
    <a href="product/3.html">
        <img src="images/3.jpg" />
    </a>
    ...
</div>

If you want extra space surround Flexbin gallery, use "flexbin-margin" class:

<div class="flexbin flexbin-margin">
    <a href="product/1.html">
        <img src="images/1.jpg" />
    </a>
    <a href="product/2.html">
        <img src="images/2.jpg" />
    </a>
    <a href="product/3.html">
        <img src="images/3.jpg" />
    </a>
    ...
</div>

Customize with SaSS

If you use SaSS, you can customize Flexbin further:

// Desktop, large screen devices
$flexbin-row-height: 200px; // height of image rows
$flexbin-space: 10px; // space between images

// Tablet, medium screen devices
$flexbin-tablet-max: 800px;
$flexbin-row-height-tablet: 150px;
$flexbin-space-tablet: 8px;

// Phone, small screen devices
$flexbin-phone-max: 400px;
$flexbin-row-height-phone: 100px;
$flexbin-space-phone: 4px;

@import "path/to/flexbin.scss";

.my-flexbin {
    @include flexbin(100px, 8px);
}

.my-flexbin-large {
    @include flexbin(400px, 20px);

    @media (max-width: 768px) {
        @include flexbin(200px, 10px);
    }
}

TODO

  • Publish on Bower, Composer, Gem, etc.
  • Fallback mode for IE, Edge and other old browsers

Copyright & License

Copyright 2017 Guo Yunhe & xieranmaya. Code released under GNU General Public License version 3 or later. See LICENSE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].