: red; } //AN_Xml: 20% { background: orange; } //AN_Xml: 40% { background: yellow; } //AN_Xml: 60% { background: green; } //AN_Xml: 80% { background: blue; } //AN_Xml: 100% { background: violet; } //AN_Xml:} //AN_Xml: //AN_Xml:@-moz-keyframes super-rainbow { //AN_Xml: 0% { background: red; } //AN_Xml: 20% { background: orange; } //AN_Xml: 40% { background: yellow; } //AN_Xml: 60% { background: green; } //AN_Xml: 80% { background: blue; } //AN_Xml: 100% { background: violet; } //AN_Xml:}

Then we apply that animation to the image:

img {
//AN_Xml:     background: red;
//AN_Xml:     -webkit-animation: super-rainbow 15s infinite alternate linear;
//AN_Xml:     -moz-animation: super-rainbow 15s infinite alternate linear;
//AN_Xml:}

That'll do 'er. Check out the demo for this example and other quick fun one of rainbow gradient on a bicycle shape that moves on hover.

View Demo   Download Files

Images snagged off of Vecteezy.


Advertise here with BSA

]]> http://css-tricks.com/color-animate-any-shape-2/feed/ 20 //AN_Xml: new Image(); //AN_Xml:magicEtherImage.src = img.src; //AN_Xml: //AN_Xml:var padding = 20; // little buffer to prevent forced scrollbars //AN_Xml: //AN_Xml:// Values to use when opening window //AN_Xml:var winWidth = magicEtherImage.width + padding; //AN_Xml:var winHeight = magicEtherImage.height + padding;

I use jQuery on my site, so ultimately my code is like this:

$(".view-full-size").click(function() {
//AN_Xml:
//AN_Xml:  var mainScreenshot = $("#main-screenshot");
//AN_Xml:
//AN_Xml:  var theImage = new Image();
//AN_Xml:  theImage.src = mainScreenshot.attr("src");
//AN_Xml:
//AN_Xml:  var winWidth = theImage.width + 20;
//AN_Xml:  var winHeight = theImage.height + 20;
//AN_Xml:
//AN_Xml:  window.open(this.href,  null, 'height=' + winHeight + ', width=' + winWidth + ', toolbar=0, location=0, status=0, scrollbars=0, resizable=0'); 
//AN_Xml:
//AN_Xml:  return false;
//AN_Xml:
//AN_Xml:});

You can see it in action on single gallery pages like this.

Obviously it doesn't do much on mobile, so I just remove the button with a media query.

Open a Window with Full Size Unscaled Image is a post from CSS-Tricks

]]> http://css-tricks.com/open-a-window-with-full-size-unscaled-image/feed/ 27 //AN_Xml: if(attr != null){ x.item(i).setAttribute("href", _AN_full_url(attr.nodeValue)); } } } var xsltProcessor = new XSLTProcessor(); xsltProcessor.importStylesheet(xsl); var result = xsltProcessor.transformToDocument(xmlDom); var xmls = new XMLSerializer(); var data = (xmls.serializeToString(result)); data = data.replace(/ ns for handling navigation on small screens.

//AN_Xml:

Direct Link to ArticlePermalink

Responsive Navigation Patterns is a post from CSS-Tricks

]]> //AN_Xml: Brad Frost shows examples and covers the various techniques/pros/cons for handling navigation on small screens.

//AN_Xml:

Direct Link to ArticlePermalink

Responsive Navigation Patterns is a post from CSS-Tricks

]]>
//AN_Xml: http://css-tricks.com/responsive-navigation-patterns/feed/ //AN_Xml: 0 //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: