I wonder how to make a div glow in a specific color when the page has loaded.
<div id="glow" class="logo registrer"><a href="http://henricson.net/registrer.php" class="understrek">Registrer deg</a></div>
This is the div i want to glow. Thank you :)
CSS3 can do that:
-webkit-box-shadow:0 0 20px blue;
-moz-box-shadow: 0 0 20px blue;
box-shadow:0 0 20px blue;
Here's a JSFiddle that shows that it does, in fact, it works fine with me, check it out to see :)
I'm not sure how you mean to glow? If to simply change colour then you can do something like the below.
$(document).ready(function(){
$('#glow').animate({backgroundColor:'green'});
});
You could then add some box-shadow
to add a glow effect.
-webkit-box-shadow: 0px 0px 5px 5px rgba(0, 150, 0, 0.3);
box-shadow: 0px 0px 5px 5px rgba(0, 150, 0, 0.3);
Please see this example fiddle of an animating background colour and shadow added.
EDIT
Sorry I forgot to mention you'll need to include the color animation plugin to be able to do this.
Also here is another fiddle that runs after half a second and then removes the glow.... obviously this would need alot of tweaking to make it look nice.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With