dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: CSS3 -webkit-transition shows default link color the first few seconds

  1. #1
    Join Date
    Aug 2011
    Posts
    2

    CSS3 -webkit-transition shows default link color the first few seconds

    I have the following css:

    HTML Code:
    <style>
    a {
        color: #F90;
        -webkit-transition: color 0.5s ease-in-out;
    }
    a:hover {
        color: #090;
    }
    </style> 
    <a href="#">Nom nom</a>
    I have noticed that when I load the page the default blue color is applied to the links, which then turns over 0.5s into the orange I have specified. Is it possible to keep the transition, but eliminate this unwanted side-effect? (I want the transition from orange to green (hover), and also backwards, so I cannot move the transition to a:hover).

    Thanks in advance
    - opatut

  2. #2
    Join Date
    Aug 2011
    Location
    Worthing, West Sussex
    Posts
    96
    So you want it to fade? Or just to have a delay? Best bet is to use jQuery.

  3. #3
    Join Date
    Aug 2011
    Posts
    2
    Nah, I want it to fade, using pure CSS. But try it yourself, when you use that css it works, only because the links are blue by default, they fade from blue to orange when you load the site. Which is very ugly and disturbing.

  4. #4
    Join Date
    Aug 2011
    Location
    Worthing, West Sussex
    Posts
    96
    Have you tried the !important ? Don't know if this will help loading but your best bet is to use jquery or some sort of JavaScript otherwise you're not going to be able to use the load property.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles