1

I can set the text of a span with this css.

.tracking-true .tracking-button-text:before
{
    content:"Tracking";
}

But I would like to change the text on hover Something like this but I can't get it to work.

.tracking-true .tracking-button-text:hover
{
    content:"Untrack";
}

Can this be done in css?

Update: Much like Stackoverflow uses :hover to change the cursor to a pointer or change a background color as a ui hint I am trying to convey to the user the same thing. This element can be clicked on and something will happen. I don't feel this is an innaporopriate use of CSS.

4

1 に答える 1

3

Do this:

.tracking-true .tracking-button-text:before
{
    content:"Tracking";
}

.tracking-true .tracking-button-text:hover:before
{
    content:"Untrack";
}
于 2013-03-08T21:44:01.693 に答える