Reputation: 3506
My brand name is: Code
My nav
look like this
Code Home | Service | Product | Contact
I want to change Code
-> { Code }
when users hover on my my brand name.
I want to style the { }
to have red
color.
I want the { }
to slide right in no later than 2
seconds.
Can someone tell me how can I do that in CSS
?
Will I need JS
for that due to animation involve ?
Edit
Direction of animate
{<-- Code -->}
Upvotes: 0
Views: 35
Reputation: 12933
I would do something like this. You can use CSS's transitions
to create some nice effects
<div class="logo">
<span class="left">{</span>
Code
<span class="right">}</span>
</div>
Upvotes: 2
Reputation: 1803
Here is a fiddle
http://jsfiddle.net/rLdtse86/13/
You use Pseudo elements on hover action
a:hover::before
{
content:"{";
}
a:hover::after
{
content:"}";
}
Upvotes: 2