Posts Tagged “css3”

HTML5/CSS3 (and a little jQuery) strength indicators

Want an easy way to add a password strength indicator without extra markup? Try the following method – it used a small chunk of jQuery code to assess the strength and then displays it using some nifty css3 styling.

Cool? No extra markup is needed, and there’s very Javascript code too making this a nice lightweight enhancement.

Continue reading →

CSS3 scale and rotate animation (webkit only)

Have you tried hovering over my logo (up top) in webkit? The animation is a nice effect and is really easy to implement as a progressive enhancement.

#logo a:hover {
    -webkit-animation-name: rotateThis;
    -webkit-animation-duration:2s;
    -webkit-animation-iteration-count: 1;
    -webkit-animation-timing-function:ease-in-out;
}
@-webkit-keyframes rotateThis {
    0% { -webkit-transform:scale(1) rotate(0deg); }
    10% { -webkit-transform:scale(1.1) rotate(0deg); }
    100% {-webkit-transform:scale(1.1) rotate(360deg); }
}

The important part is the ‘keyframes’ chunk – this tells the browser what to animate, and at what point. In my example we start off (0%) with a non-scaled, non-rotated element. We then (at 10%) make it larger, and finally we make it finish (100%) fully enlarged and rotated 360 degrees.