缩小背景图像
我有一个用作图片框架的透明 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
CSS-2 不支持背景图像的缩放。
CSS-2 does not support scaling of background images.