有没有办法在动态内容中使用CSS精灵?

发布于 2024-08-31 00:35:30 字数 70 浏览 1 评论 0原文

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

对岸观火 2024-09-07 00:35:30

您可以在编写 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.

对你的占有欲 2024-09-07 00:35:30

你的代码看起来像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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文