Note that there are some explanatory texts on larger screens.

plurals
  1. POGlowing right angle quote animation with CSS3 and/or Javascript
    primarykey
    data
    text
    <p>I'm looking to make a clever animation that makes three sucessive right angle quotes like <code> &raquo; &raquo; &raquo;</code> glow successively from left to right, then back to the left-most one again. I'm wondering if this might be a clever effect for other developers to use as well, and could be good Google-fodder. </p> <p>The inspiration for this is obviously the slide-to-unlock screen on an iPhone, where the text glows in a progressive manner. </p> <p>I do know about CSS3 animations with keyframes and have implemented these successfully before, but am not sure how to code in the part with the loop. I'm guessing Javascript is the answer here, with some kind of loop. I already have jQuery on the page I'm using so it wouldn't be anything extra to use jQuery functionality. </p> <p>My HTML structure would be something like this:</p> <p><code>&lt;span class="glowquote"&gt;&lt;span&gt;&amp;raquo;&lt;/span&gt; &lt;span&gt;&amp;raquo;&lt;/span&gt; &lt;span&gt;&amp;raquo;&lt;/span&gt;&lt;/span&gt;</code></p> <p>Any ideas on the best/most clever way to implement this? I realize not all browsers support CSS3 animations if they are to be used and honey badger don't care, I only need to support modern webkit and gecko implementations.</p> <p><strong>Edit 1:</strong> added span tags around each <code>&amp;raquo;</code> to allow changing CSS properties individually for each right angle quote in JavaScript, as most people have done. For the guy who did the CSS3 method, not necessary!</p> <p><strong>Edit 2:</strong> Just for absolute clarity on what the goal is, the left-most one will glow a certain color first, using a CSS <code>color:green</code> etc. change and <code>transition:color linear 0.4s</code> etc, then the next one will do the same right after with maybe a short delay. </p> <p><strong>Edit 3:</strong> For further clarification, the exact animation I'm looking for looks like this, though in the example they've used a <em>VERY</em> hack-ish method that I don't think will work for a lot of people. I'm wondering if we are just coming up against the limitations of javascript/css3 or if there is more refinement possible. Link: <a href="http://css-tricks.com/examples/SlideToUnlock/" rel="nofollow">http://css-tricks.com/examples/SlideToUnlock/</a></p> <hr> <p><strong>FINAL EDIT WITH SOLUTION SUMMARY:</strong> I decided to go with the pure CSS3 option but there are many valid options presented here that are all worthy of your time. I wish StackOverflow would allow for more than one correct answer. For anyone coming to this question from Google or elsewhere, make sure to browse the whole question to choose what may work the best for you! I figured that since this is mostly just for fun, I would feel okay leaving the Firefox &amp; IE guys out in the dark. You can see what my final implemention was here: <a href="http://ezrahub.com/board/" rel="nofollow">http://ezrahub.com/board/</a> at the top of the page, where it is used to expand the posting form. One quirk is that if you change the text size, you will also have to change the property <code>background-size</code> in your CSS stylesheet. I used <code>background-size: 120px 50%;</code> for mine, and if you play around with it you can see how the effect changes.</p> <p>Hope everyone has fun with this and enjoy using it on your creations! Shout out to autistic moderators such as @JaredFarrish. (Why so mad?)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    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