background preloader

CSS drop-shadows without images

CSS drop-shadows without images
Drop-shadows are easy enough to create using pseudo-elements. It’s a nice and robust way to progressively enhance a design. This post is a summary of the technique and some of the possible appearances. Demo: CSS drop-shadows without images Known support: Firefox 3.5+, Chrome 5+, Safari 5+, Opera 10.6+, IE 9+ I’ll be looking mainly at a few details involved in making this effect more robust. After a bit of back-and-forth on Twitter with Simurai, and proposing a couple of additions to Divya’s and Matt’s demos using jsbin, I felt like documenting and explaining the parts that make up this technique. The basic technique There is no need for extra markup, the effect can be applied to a single element. The pseudo-elements need to be positioned and given explicit or implicit dimensions. The next step is to add a CSS3 box-shadow and apply CSS3 transforms. One of the pseudo-elements then needs to be positioned on the other side of the element and rotated in the opposite direction.

Home How to create slick effects with CSS3 box-shadow Drop shadows and inner shadows are some of the effects I learned to apply using Photoshop's Blending options. But now, since CSS3 "hit the charts", you don't need Adobe's design tool to add a drop shadow or an inner shadow to a box. Nowadays, the cool thing is that you create beautiful CSS3 shadows without actually needing Photoshop anymore. View demo box-shadow property Thebox-shadow property allows you to add multiple shadows (outer or inner) on box elements. <shadow> = inset? Rocket science? Not at all, here's an quick example: box-shadow: 3px 3px 10px 5px #000; This CSS declaration will generate the following shadow: A positive value for the horizontal offset draws a shadow that is offset to the right of the box, a negative length to the left.The second length is the vertical offset. The above theory it's just a small amount, if you want to read more, than be my guest and check the W3C specs. Enough theory, let's see some stuff! Add depth to your body Reference URL Drop shadows Quick tips

jQuery: The Write Less, Do More, JavaScript Library CSS 3D Image Flip Gallery With Dynamic Shadows My recent book Pro CSS3 Animation walked the reader through a simple version of a 3D flip image gallery. After publication, I wanted to take it further: thus, this article. The UI challenge addressed here is the same focused on in many of my other CSS 3D works, such as the Origami UI: we live in a world of increasingly diversified screens, with smaller sizes rapidly becoming the norm. That demands a reconsideration of space: rather than placing captions below photographs, we might want to place them behind the image, to be revealed with a mouseover or tap action. Creating The Basic Gallery The markup for the image flip gallery couldn’t be much simpler: <figcaption>Yacht</figcaption> <figcaption>Bee</figcaption> <figcaption>Queens-town</figcaption> Note the outer div for each figure, which will be used to create a 3D context for the gallery content. To gain the 3D effect shown in the example, we need to do three things: The Initial CSS div.flip-3d { perspective: 1200px; width: 30%; float: left;

9 jQuery Scripts to Enhance Your Website Time for a roundup for all the jQuery plugins that have been on the wild for a few weeks. There are getting more and more jQuery plugins coming out just to meet your special needs. In this post, I particularly like Sausage contextual pagination, I think it's a brilliant ideas! Here you go, pretty sure some of them will be really useful. TN3 Gallery TN3 Gallery is a full fledged HTML based customizable jQuery slideshow with slideshow, transitions and multiple album options. Backstretch is a simple jQuery plugin that allows you to add a dynamically-resized background image to any page.

Responsive Images Done Right: A Guide To <picture> And srcset jQuery | Tutorialzine | Page 6 Creating a PHP and CSS3 PoweredAbout Page By Martin Angelov | Here we will be creating a simple about page that is powered by PHP, HTML5 and CSS3. Read more Making a Beautiful HTML5Portfolio In today’s tutorial we will be making a beautiful HTML5 portfolio powered by jQuery and the Quicksand plugin.

Responsive Images: If you're just changing resolutions, use srcset. | CSS-Tricks By Chris Coyier On September 30, 2014 responsive images If you're implementing responsive images (different images in HTML for different situations) and all you are doing is switching between different versions of the same image (the vast majority of usage), all you need is the srcset attribute on the <img>. Gaze upon this easy syntax: It's not just the syntax that is easy, it does a better job than <picture> with <source>s with explicit media attributes (we'll cover why in a moment). Plus it has the opportunity to be much better in the future with browser settings and browser improvements. I've screencasted about this before, but it clicked better watching Mat Marquis's talk at An Event Apart Austin and with Jason Grigsby's post. #With srcset, the browser does the work of figuring out which image is best In the simple example above, all we're doing is telling the browser about some images that we have available and what size they are. The browser goes: Now another browser visits the site.

Colortip – a jQuery Tooltip Plugin Martin Angelov In this tutorial we are going to write a simple jQuery tooltip plugin. It is going to convert the title attributes of elements withing your page, into a series of colorful tooltips. Six color themes are available, so you can easily match it with the rest of your design. Step 1 – XHTML The plugin we are about to write today, works by converting the title of an element on the page to a structure of three spans, which form a tooltip, displayed on hover. <a href=" class="blue" title="Go to Tutorialzine">Tutorialzine</a> jQuery will convert it to the markup you can see below. <a class="blue colorTipContainer" href=" <span class="colorTip" style="margin-left: -60px;">Go to Tutorialzine <span class="pointyTipShadow"></span><span class="pointyTip"></span></span></a> Notice that the first block of code above specifies a “blue” class name. Step 2 – CSS colortip-1.0-jquery.css – Part 1 Making a triangular shape with a div

19 tips y trucos para CSS El CSS es la manera más perfecta de ponerle estilos y efectos a tus diseños web, y ahora con CSS3 trae más posibilidades de afectar y mejorar tus diseños. Es por eso que aquí te traigo algunos tips y trucos para CSS, para que puedas implementarlos fácilmente en tu diseño web. Cambiar el color de la selección de texto Cuando seleccionas un texto por defecto el texto se convierte en color blanco y el fondo en color azul, pero que pasa si quieres que esto sea diferente en tu web. Solo debes pegar esto en tu CSS: Demostración Letra capital Con este código puedes hacer que la primera letra de un párrafo sea más grande que las demás: Demostración Enlaces que gradualmente se desvanecen Con este código harás que cuando un usuario ponga el cursor encima de un enlace (en este caso el enlace del título), éste se desvanezca: Demostración Rotar una imagen Este Código CSS te permite rotar una imagen los grados que gustes: Demostración Mover 1px el enlace al hacer clic Demostración CSS3 Media Queries [/css] [css]

45 Outstanding Free Vintage Fonts - Noupe Design Blog Oct 11 2009 In his famous 1908 essay, ‘Ornament and Crime,’ modern architect Adolf Loos wrote: “The evolution of culture marches with the elimination of ornament from useful objects.” This pronouncement banished many of the frilly, decorative fonts of centuries past from the realm of High Design. Fast forward to the present day: Web 3.0 is awash in enough sleek sans serif and classic roman typefaces to make designers long for the typographic indulgences of yesteryear. Harness the power of the antique and make your graphics pop with one of these vintage-inspired fonts, which have returned to the spotlight both in print and online. Wood Type and Display Fonts Carnivalee Freakshow This distressed, wood-type-inspired font has the shabby charm of an old sideshow banner. Circus Ornate Dieter Steffmann’s Circus Ornate captures the spirit of classic circus graphics, but still stands on its own as an ornamental, boisterous display font. JF Ringmaster A vintage beauty by Jester Font Studio. Waukegan

pointer-events The pointer-events property allows for control over how HTML elements respond to mouse/touch events – including CSS hover/active states, click/tap events in Javascript, and whether or not the cursor is visible. While the pointer-events property takes eleven possible values, all but three of them are reserved for use with SVG. The three valid values for any HTMl element are: none prevents all click, state and cursor options on the specified HTML elementauto restores the default functionality (useful for use on child elements of an element with pointer-events: none; specifiedinherit will use the pointer-events value of the element's parent As demonstrated above, the prime use case for pointer-events is to allow click or tap behaviour to “pass through” an element to another element below it on the Z axis. Points of Interest “The use of pointer-events in CSS for non-SVG elements is experimental. Other Resources Browser Support

Related: