Skip to content

tompave/tile_show

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Tile Show

Simple implementation of a tile-based design.

##Live Demo There is a live demo.

##We are dwarfs standing on the shoulders of giants

Implementing this kind of layout is quite simple.

First off, you'll need some way to animate movements. I've used CSS3 Transitions, but you can achieve the same effects using JavaScript.
A good place to get started on CSS3 transitions is the Using CSS transitions article on the Mozilla Developer Network.
A more thourough and detailed resource is the CSS transitions specification on the W3C website. It also contains a useful list of CSS properties that should be animatable through CSS transitions, although web browsers might not support all of them quite yet.

Secondly, to obtain that cool fill all the gaps effect you can't rely on CSS floats alone. You will need to listen for the window resize event, accessible through JavaScript.
The good news is that someone has already created an amazing library that takes care of that: Masonry. The default library works as a JQuery plugin, but you can also use the independent version: Vanilla Masonry.

Finally, you have to consider what parts of your design might or might not work on a touch screen.
For example, I've used a :hover CSS selector to present a descriptive text over the tiles. This won't work well on a touch screen, so I've used Modernizr to detect the device type and JavaScript to adapt the triggers when necessary: from .tile:hover (mouse) to $(".tile").click(); (finger).

##License

The MIT License (MIT)

Copyright (c) 2013 Tommaso Pavese

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Simple implementation of a tile-based grid design. Each tile floats in position as the window is resized. Responsive. Reacts to mouse hover on desktop and on finger taps on touch screens.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors