Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to animate font-weight with CSS3?
    primarykey
    data
    text
    <p>I want to use only HTML5 and CSS3 only as much as possible on my website.</p> <p>I'm trying to animate the text on my contact button. More specifically, I want it to change color and be <code>font-weight: bolder</code> 4 seconds every 20 seconds.</p> <p>Right now it does switch colors, but it just won't get bold in Chrome, Safari and Opera. It works fine in Firefox and IE.</p> <p>Here is the CSS I'm using:</p> <pre><code>#contact { position: fixed; margin-top: 63px; margin-left: 680px; width: 250px; height: 55px; transform:rotate(-36.87deg); z-index: 20 !important; font-size: 24px; line-height: 55px; text-align: center; text-decoration: none; color: #FFFFFF; transition: all 1s ease; animation-name: alarmlight; animation-iteration-count: infinite; animation-duration: 20s; } @keyframes alarmlight { 0% { color: #FFFFFF; font-weight: normal; } 80% { color: #FFFFFF; font-weight: normal; } 85%{ color: #00F; font-weight: bolder; } 90% { color: #F00; font-weight: bolder; } 95% { color: #00F; font-weight: bolder; } 100% { color: #F00; font-weight: bolder; } } a#contact:hover { color: #FFF101 !important; font-weight:bold !important; animation-name:none; transition: all 1s ease; transform: translate(18px,-18px) rotate(-36.87deg); } </code></pre> <p>Check <a href="http://www.hetisnieuw.nl/EHBV/" rel="nofollow">Here</a> to see it in action.</p> <p>Update: also created a simple <a href="http://jsfiddle.net/LUMwc/9/" rel="nofollow">jsfiddle</a> to show the problem in its core. </p> <p>Update: Updated the CSS in this post to reflect the code im using in its current state.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload