I'm fairly new to complex coding, i know the basics of both CSS and HTML and i'm beginning to learn more complicated things like transitions and animations but i've been stuck on something for a while. How exactly do you add text to a transition? Like say you add a transition to a div element, it slides down and nothing is there, but you want to add text when it slides down. How do you go along adding the text? I'm not sure how clear this is, i apologize if it confuses some ! But in a basic what i want to do is make the transition slide down when you hover over it ( which i've done ) and make text appear only when you hover it ( like in the newly exposed area the transition makes ! ) Please help if you can ! Thank you for reading c:
Asked
Active
Viewed 1,239 times
0
-
something like [this](http://stackoverflow.com/questions/5210033/show-div-on-hover-with-only-css)? – Bruno Belotti May 08 '15 at 23:49
1 Answers
0
to just add text via css would be content:"YOURTEXT"
so you would have something like
.element:hover{content:"myhovertext";}
but you might need something a little more complex than that to achieve what your looking for.
Happy to help further if needed.
-
yes but the content property isn't animatable or able to do transitions :c heres a example of what i'm doing if it helps: https://jsfiddle.net/princegbert/hk2f3r52/ – John Litwick May 09 '15 at 00:16