0

Share Me

While working on a recent mobile website project, one of the requirements was to make the site as lightweight as possible so not to impact loading times on mobile devices.

The CSS is cross-browser ready and utilises the CSS generated by Colorzilla’s Ultimate CSS Gradient Generator and css3generator.com

Here’s the CSS Code used to generate the button

    .button
    {
        padding:3px 8px;

        font:bold 1em Arial; color:#ffffff;
        text-shadow: 0px 1px 1px #000000;
        filter: dropshadow(color=#000000, offx=0, offy=1);

        background: rgb(106,155,203); /* Old browsers */
        background: -moz-linear-gradient(top, rgba(106,155,203,1) 0%, rgba(61,125,188,1) 49%, rgba(47,115,182,1) 50%, rgba(31,105,177,1) 100%); /* FF3.6+ */
        background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(106,155,203,1)), color-stop(49%,rgba(61,125,188,1)), color-stop(50%,rgba(47,115,182,1)), color-stop(100%,rgba(31,105,177,1))); /* Chrome,Safari4+ */
        background: -webkit-linear-gradient(top, rgba(106,155,203,1) 0%,rgba(61,125,188,1) 49%,rgba(47,115,182,1) 50%,rgba(31,105,177,1) 100%); /* Chrome10+,Safari5.1+ */
        background: -o-linear-gradient(top, rgba(106,155,203,1) 0%,rgba(61,125,188,1) 49%,rgba(47,115,182,1) 50%,rgba(31,105,177,1) 100%); /* Opera11.10+ */
        background: -ms-linear-gradient(top, rgba(106,155,203,1) 0%,rgba(61,125,188,1) 49%,rgba(47,115,182,1) 50%,rgba(31,105,177,1) 100%); /* IE10+ */
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6a9bcb', endColorstr='#1f69b1',GradientType=0 ); /* IE6-9 */
        background: linear-gradient(top, rgba(106,155,203,1) 0%,rgba(61,125,188,1) 49%,rgba(47,115,182,1) 50%,rgba(31,105,177,1) 100%); /* W3C */

        border:2px solid #cccccc;
        -webkit-border-radius: 5px;
        -moz-border-radius: 5px;
        border-radius: 5px;
    }

Live Demo

0

Share Me

Recently I posted about some of the new features of HTML5 and CSS3 as showcased over at apple.com.  While digging a bit deaper into what HTML5 can do I came across http://www.html5test.com which gives your web browser a score out of 300 depending on how many HTML5 features it supports.

I thought I’d give it a go on all the browsers I have installed on my PC to see which is really the best.

Continue reading “HTML5 Browser Testing” »

Optimized by SEO Ultimate