jquery - CSS not working on spritesheet loaded in manifest -
I am loading all my page elements using a manifest in the createjs, even though CSS does not apply to the sprysheesh.
// CSS .btn {background-position: -200px 0px; Status: Completed; Width: 100px; Height: 101px; Opacity: 1; Margin-left: 1px; Margin-top: 49px}; // JavaScript appears = [[src: "images / spritesheet.png", id: "spritesheet"}}; Loader = new createjs.LoadQueue (wrong); Loader.loadManifest (revealed); Loader.on ("full", handle complete, this); Function handle full () {var btn = loader.getResult ("spritesheet"); $ (".btn") .andand (_btn)} This works when I load CSS from the image, though I should try something wrong I try some things But still there is a problem.
.selection_btn01 {background-image: url (images / spritesheet.png); Background-position: -200px 0px; Status: Completed; Width: 100px; Height: 101px; Opacity: 1; Margin-left: 1px; Margin-top: 49px}; After adding the CSS ({"background-condition": "-200 px 0px"}) .append () has tried to think that loading the image before CSS Has been implemented. All I have got is all the spec shits, which are being displayed to all the states. Any suggestion would be appreciated;)
The following is returned in the example above BTN = & lt; IMG src = "picture / spreadsheets page" & gt; To get the desired result I really needed to do this
$ (".btn"). Css ({"background-image": 'Url (' + _ btn.src + ')'});
Comments
Post a Comment