Skip to main content

Posts

Showing posts with the label Light Box

CSS3 box-shadow and image hover effects

The  CSS3 box-shadow property  is a new way of adding drop shadow effects just by editing a style sheet. There’s no need to use Photoshop! Just open your style sheet in a text editor and away you go. Well, it’s almost as simple as that but not quite. There’s one caveat and that is browser support. The box-shadow property is supported by Firefox and Safari (and Google Chrome), using the proprietary  -moz-  and  -webkit-  prefixes, but it’s not supported by Internet Explorer (or other browsers). For this reason, I think the box-shadow property is ideal for adding image link hover effects where the shadow is not absolutely  essential but where it provides a nice style enhancement (enrichment) for modern browsers. Box-shadow basics First, a quick introduction and explanation. The box-shadow property takes several attributes/values, like any other  CSS  property, and these are are specified in order as follows: Horizontal offset of the shadow: a positive value for shadows on the ri

Lightbox image viewer

Description:  Lightbox JS is an elegant, unobtrusive script that overlays a larger version of an image on the current page for display when clicked on- an image thumbnail viewer if you will. It's a snap to setup and works on all modern browsers. Demo:  (links are set to open in a popup window):     Nice mountain view Directions Step 1:  Insert the below code in the HEAD section of your page: <link rel="stylesheet" href="lightbox.css" type="text/css" media="screen" /> <script type="text/javascript" src="lightbox.js"></script> Step 2:  Create your "thumbnail" HTML code. Three basic flavours are supported: <a href="dog.jpg" rel="lightbox" ><img src="dog_thumb.jpg" /></a> <a href="cat.jpg" rel="lightbox" title="Caption- cute cat!"><img src="cat_thumb.jpg" /></a> <a

Create a Lightbox effect only with CSS – no javascript needed

You may call it Lightbox, or Greybox, or Thickbox, but it’s always the same effect. When you are on a page, and click on a photo or trig some event, a Lightbox is an effect that fades the pagein the background to show you new content in the foreground. I mean this effect In the upper example, when clicking on a photo the site fades to black and shows the photo, in the lower one when clicking on “login” the site fades to white and shows the login form. There are tons of Lightbox scripts in the web, each one with its unique features and limitations, but all require massive use of Javascript or the installation of javascript frameworks. In some cases, there are “lightweight” versions with “only” 40KB of Javascript. This example does not want to compete with those scripts, but if you are looking for a simple, 100% CSS, 0% javascript lightbox, this may help you. Features of this Lightbox: 100% CSS as said You can insert any content in it (some scripts out there only all