I know you can fade out a <div>
with jQuery, but I was wondering if it's possible to fade out a border for a <div>
?
So I've got my <div>
:
<div class="confession" style="border:3px solid #DDD;">
</div>
And I'd just like to some how make that border fade out after 5 seconds.
update
Anyone still wanting to do this can do this with CSS3 transitions.
Just be sure to check it's within your supported browsers capability: http://caniuse.com/#search=transition
example
div {
border: 4px solid red;
-webkit-transition: border-color .25s ease;
-moz-transition: border-color .25s ease;
-ms-transition: border-color .25s ease;
-o-transition: border-color .25s ease;
transition: border-color .25s ease;
}
div:hover {
border-color: none;
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…