有没有办法在动态内容中使用css sprites?

问题描述:

I mean, using css sprites on non static content like: Inside while(mysql_fetch_array())...

我的意思是,在非静态内容上使用css sprites,例如:Inside while(mysql_fetch_array())... p> div>

You can use a CSS sprite anywhere you are writing HTML code... As far as "inside while..."... i have no idea what you mean by that. If your while loop prints HTML, then yes, you can use a sprite.

your code looks like PHP. That is processed on the server to generate static HTML content. It is not executed dynamically in the browser like JavaScript. You can have have the element classes and id attributes echoed out to whatever content your'e generating in PHP and then reference those from your CSS.