开发者

Width of Sprite image adjusted to Ajax generated content

开发者 https://www.devze.com 2023-02-06 03:03 出处:网络
I have a form button that开发者_C百科 has a sprite image as background.It works fine with all content EXCEPT if the content is loaded via AJAX.

I have a form button that开发者_C百科 has a sprite image as background. It works fine with all content EXCEPT if the content is loaded via AJAX.

Thanks!


try setting an id say <button type="button" id="foo">Click Me!</button> and put the css within the content that is loaded using ajax.

<style type="text/css">
/*<![CDATA[*/
    #foo
    {
        background: transparent url('http://foo.com/images/sprites.png') no-repeat fixed 0px 0px;
    }
/*]]>*/
</style>
0

精彩评论

暂无评论...
验证码 换一张
取 消