views:

31

answers:

1

this is my code:

<style type='text/css'>
    div {
    width: 100px;
    height: 100px;
    text-align: center;
    font-size: 22px;
    background-image: -webkit-gradient(linear, left top, left bottom,
                    color-stop(0.40, #ff0),
                    color-stop(0.5, orange),
                    color-stop(0.60, rgb(255, 0, 0)));
    -webkit-transform: rotate(180deg)
}
</style>
    <div id="test">click me to play</div>

the div rotate 180 deg , and the font is also rotate 180 deg,

but , i don't want the font rotate ,

what can i do .

thanks

A: 

Why rotate it at all? Just describe your gradient the other way round:

background-image: -webkit-gradient(linear, left bottom, left top,
                color-stop(0.40, #ff0),
                color-stop(0.5, orange),
                color-stop(0.60, rgb(255, 0, 0)));
robertc
when the background is a image, what can i do .thanks
zjm1126
@zjm1126 Either invert the background image yourself, or put the text in a wrapper element and rotate it opposite to the 'background' element.
robertc