有没有办法在动态内容中使用CSS精灵?
我的意思是,在非静态内容上使用 css 精灵,例如: Inside while(mysql_fetch_array())...
I mean, using css sprites on non static content like: Inside while(mysql_fetch_array())...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以在编写 HTML 代码的任何地方使用 CSS 精灵...至于“在
while...
内部”...我不知道您的意思。如果您的 while 循环打印 HTML,那么您可以使用精灵。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.你的代码看起来像PHP。在服务器上进行处理以生成静态 HTML 内容。它不像 JavaScript 那样在浏览器中动态执行。您可以将元素类和 id 属性回显到您在 PHP 中生成的任何内容,然后从 CSS 中引用这些内容。
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.