{Carrer web log} ←
CSS3 Fancy Box
Monday, February 13, 2012 { 6 Comments }
About two years ago I made CSS3 Action Framework and next step was to make the replica of the Fancy Box with pure CSS3, I haven't had the time to finish the project until one week ago when was "or now or never" for the project.So what is the purpose of this project?
Modular CSS3 Fancy Box similar to original Fancy Box. By simply adding new classes to the class we should be able to control the appearance of the CSS3 Fancy Box. We should be able to control the transparency of the border, animation entry, rounded corners etc.
Example: If we have class="show fancybox rounded transparent-border" we will have rounded corner box with transparent border.
The event is triggered by :target selector showing the previously hidden HTML element (display:none) when we click the close button we put the box to its previous hidden state.
The best part is it is only 1,5Kb of CSS3. No images (even the close button is made with CSS3). Also there is no single line of javaScript.
The original Fancy Box weights about 100 kb + JQuery V.S 1.5 Kb of CSS3.
My aim wasn't to compete with the Original Fancy Box but to show what can be done with little CSS3.
It works in all modern browsers. It doesn't work in IE 9.
Demo1
Demo2
Download this project on GitHub
Naturally this method comes with lot of limits like doesn't support Ajax calls or can't dynamically determine position of the new Box. But can be use like a simple solution in some cases. Try to understand how the CSS code works, don't be afraid to play with CSS source code and personalize the CSS code for your needs.
6 Responses to “CSS3 Fancy Box”
- // Pim VV // 2/13/2012
- // Hugh Isaacs II // 2/13/2012
- // Vladimir // 2/13/2012
-
//
// 2/14/2012
Doesn't seem to be working properly in Firefox 9.0.1. Anyway, I *like* that the box goes away when you click the back button. All lightbox implementations break the browser's navigation controls because the "Back" button takes you two steps back in your navigation rather than one (clearing the image and going back to the page).
- // Logo Design // 2/15/2012
- // Compare Companies // 2/15/2012
<< Home
About Me <<<
Name: Vladimir Carrer
vladocar [at] gmail.com
Location: Verona, Italy
I'm a web designer, developer, teacher, speaker, generally web addicted ...
My projects <<<
- Photoshop Wireframing Kit
- Hand Drawn Icons
- ALLAPIS.COM
- Hartija - Css Print Framework
- MySQL Lite Administrator
- Quark Mini PHP CMS
- Formy - CSS Form Framework
- Emastic - CSS Framework
- Malo - CSS Library
- The Golden Grid
- 1 line CSS Grid Framework
- Two Lines CSS Framework
- Child Selector System - CSS Framework
- Better Web Readability Project
- Azbuka - CSS Typographical Base Rendering Library
- ClipR - bookmarklet for better reading
- CSS3 Action Framework
- CSS Mini Reset
- HTML5 Mini Template
- CSS Mobile Reset
- picoCSS - JavaScript Framework
- HTML Lorem Ipsum Crash Test
- Object Auto Documentation - JavaScript
- o - JS Library for Object Manipulation
- Foxy - CSS Framework
- Tumblr Free Theme - Better Readability Project
§§Previous Posts <<<
- Hand Drawn UI Kit
- Some useful scripts for Photoshop Layer Manipulati...
- 2011 summary report
- Hand Drawn Icons
- Make Photoshop Guides Grid with JavaScript
- Draw Shapes in Photoshop with JavaScript
- Initiative - provide JSON and JSONP RSS Feeds
- Photoshop Wireframing Kit
- Using JavaScript Objects for storing data
- o - JS Library for Object Manipulation
Other Profiles <<<
Content is licensed under a Creative Commons Public Domain License





