缩小背景图像

发布于 2024-08-18 05:50:24 字数 174 浏览 6 评论 0原文

我有一个用作图片框架的透明 PNG,我想利用背景图像声明将图像放置在框架的透明中​​心。问题是我在后台使用的图像需要稍微缩小,以将所有图像内容放入可用的框架区域。

我不认为有 css 或 html 解决方案,我可以使用 javascript、jquery 或者 php 来动态地将背景图像缩小到加载时的某个值吗?谢谢。

I have a transparent PNG that is used as a picture frame, and I want to utilize the background-image declaration to place an image in the transparent center of the frame. The problem is that the images I'm using in the background need to be shrunk a bit to fit all of the image's content into the available frame area.

I don't think there is a css or html solution, can I use javascript, jquery, or perhaps php to dynamically shrink the background images to a certain with on load? Thanks.

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

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

发布评论

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

评论(1

青衫负雪 2024-08-25 05:50:24

CSS-2 不支持背景图像的缩放。

CSS-2 does not support scaling of background images.

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