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.

transform-function The <transform-function> CSS data type denotes a function to apply to an element's representation in order to modify it. Usually such transform may be expressed by matrices and the resulting images can be determined using matrix multiplication on each point. Coordinates for 2D graphics There are several coordinates model used when describing transformation. Cartesian coordinates In Cartesian coordinates each point of the Euclidian space is described using two values, the abscissa and the ordinate. Each linear function is described using a 2x2 matrix like: Applying the transformation consists in doing, for each point, the matrix multiplication between both: It is possible to apply several transformation in a raw: With this notation, it is possible to describe, and therefore composite, most usual transformations: rotations, scaling or skewing. Coordinates for 3D graphics Functions defining transformations matrix() Gecko (Firefox) accepts a <length> value for and . Syntax Values [a b c d tx ty]

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

CSS3 Create - Démos, tutoriels et expériences CSS : menus, galerie photos, interfaces web. CSS Style Guides As we wrap up our recent poll on ordering CSS properties, it brings up the larger issue of CSS style guides. Ordering properties is just one choice you have to make that makes up a complete styling strategy. Naming is a part of it. Sectioning is a part of it. Commenting, indentation, overall file structure... it all makes up a complete CSS style guide. Let's round up some existing ones. But first... I love pattern libraries. The List I'll list some excerpts from each that I like below. GitHub GitHub CSS Style Guide → As a rule of thumb, don't nest further than 3 levels deep. Unit-less line-height is preferred because it does not inherit a percentage value of its parent element, but instead is based on a multiplier of the font-size. Google Google HTML/CSS Style Guide → Use ID and class names that are as short as possible but as long as necessary. E.g. E.g. .demo-image not .demoimage or .demo_image Idiomatic CSS Nicolas Gallagher's Idiomatic CSS → Configure your editor to "show invisibles". ThinkUp

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;

70 Must-Have CSS3 and HTML5 Tutorials and Resources CSS3 and HTML 5 are capable of revolutionizing the way we design websites. Both include so many new features and functions that it can be hard to wrap your head around them at times. The inclusion of native support for things like rounded corners and multi-column layouts are just the tip of the ice berg. Below are seventy resources, tutorials, and articles to get you started with CSS3 and HTML 5. Many of the techniques discussed are already supported to some extent in some some modern web browsers (Safari and Firefox have the most extensive support), so you can get started right away. CSS3 Tutorials and Resources Get Started with CSS 3 – A basic guide to using CSS3. Cascading Style Sheets Current Work – Details the progress the W3C is making on the CSS3 standard. Border-image: Using Images for Your Border – A guide to the new CSS3 function for adding image borders. Overview of CSS3 Structural Pseudo-Classes – A handy reference chart of structural pseudo-classes in CSS3. HTML 5 Resources

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 CSS only menus Latest Demonstrations A CSS ONLY click action tree menu v321-01-2017A third responsive multi-level tree menu with slide action A CSS ONLY click action tree menu v216-12-2016A second responsive multi-level tree menu with slide action A CSS ONLY click action tree menu17-11-2016A responsive multi-level tree menu with slide action A CSS ONLY click action concertina menu14-11-2016A responsive multi-level concertina menu with bounce A CSS ONLY click action slide in menu29-10-2016A responsive multi-level slide in menu A CSS ONLY click action flexbox menu13-05-2016An accordion menu using flexbox and order animation. A circular menu with bounce09-03-2016A CSS only circular menu with bounce animation using cubic-bezier animation timing A responsive swipe-momentum menu24-02-2016A responsive swipe action momentum menu suitable for all the latest browsers and OS. A responsive multi-level menu14-05-2015A responsive multi-level menu suitable for all the latest browsers and OS, PCs, tablets and smartphones.

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.

Related: