Note that there are some explanatory texts on larger screens.

plurals
  1. POCSS animation with different effects on :hover and :active?
    primarykey
    data
    text
    <p><strong>EDIT</strong> Demo is here : <a href="http://3.cnxical.appspot.com" rel="nofollow">http://3.cnxical.appspot.com</a></p> <p>The <code>text-shadow</code> property changes on hover, and with <code>animation-fill-mode</code> set <code>forwards</code> the state persists. </p> <p>The animation for the :active state does not work, and nothing happens when the title is clicked. </p> <p>The expected behaviour is the title should disappear because the <code>text-shadow</code> property was set to (and both of these were tried) <code>none</code> or <code>0 0 1px transparent</code>. Setting <code>text-shadow</code> for :active was also tried without an animation and it did not work.</p> <p>How can the correct behaviour be achieved?</p> <p>The code is :</p> <pre><code> #title { position:absolute; cursor:pointer; text-align:center; top:15%; left:50%; -webkit-transform:translate(-50%,-50%); color:transparent; text-shadow:0 0 10px lime; font-size:5vmin; font-weight:bold; font-family:"Courier New",Courier,monospace; -webkit-animation: push_title_focus 0.3s; } #title:active { -webkit-user-select:none; -webkit-animation: vanish_title 0.3s; } #title:hover { -webkit-animation: pull_title_focus 0.3s; -webkit-animation-fill-mode: forwards; } @-webkit-keyframes pull_title_focus { from { text-shadow: 0 0 10px lime; } to { text-shadow: 0 0 1px lime; } } @-webkit-keyframes push_title_focus { from { text-shadow: 0 0 1px lime; } to { text-shadow: 0 0 10px lime; } } @-webkit-keyframes vanish_title { from { text-shadow: 0 0 1px lime; } to { text-shadow: none !important; } } </code></pre>
    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