Page 1 of 2

Accessing assets

Posted: Tue Jul 31, 2012 9:31 pm
by Gnetsys

How do I access assets in my assets folder? It is noted there was a change in the assets/asset-xxxx format. to "http://www.tiggzi.com/assets/myimage.png"


Accessing assets

Posted: Tue Jul 31, 2012 9:44 pm
by maxkatz

You can use this:

code
Tiggzi.getImagePath("name");
/code


Accessing assets

Posted: Tue Jul 31, 2012 9:57 pm
by Gnetsys

I would like to set the background image property via css. How could this be achieved.


Accessing assets

Posted: Tue Jul 31, 2012 9:59 pm
by Gnetsys

In addition, is there a method for employing @media for multiple screen sizes?


Accessing assets

Posted: Tue Jul 31, 2012 10:00 pm
by maxkatz

Accessing assets

Posted: Tue Jul 31, 2012 10:01 pm
by maxkatz

You can run any CSS, you are building an HTML5 app (plug optionally PhoneGap) that's running in a web browser.


Accessing assets

Posted: Tue Jul 31, 2012 10:06 pm
by Gnetsys

This is noted hoe ever when I attempt to set the background-image property using the elements class name I draw a blank.

.mycontainer { background-image: url("path/assets/myimage.png");}


Accessing assets

Posted: Tue Jul 31, 2012 10:25 pm
by maxkatz

Where do you use/set .mycontainer?

Did you try the link that I posted above?


Accessing assets

Posted: Tue Jul 31, 2012 10:32 pm
by Gnetsys

Yes I tested the link and the bg is being displayed. How ever I seek to employ backgrounds for multiple scree sizes as indicated by the sizes in the preview.

How do I employ responsive style sheets?

Example

/* Portrait /
@media screen and (orientation:portrait) {
/ Portrait styles /
}
/ Landscape /
@media screen and (orientation:landscape) {
/ Landscape styles */
}


Accessing assets

Posted: Tue Jul 31, 2012 10:35 pm
by Gnetsys

Thanks