9-Patch PNG可以用CSS在浏览器上工作 [英] Does 9-Patch PNG can work somehow with CSS on browsers

查看:116
本文介绍了9-Patch PNG可以用CSS在浏览器上工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚发现9-Patch PNG(somefile.9.png)在一个Android应用程序,我很惊讶的工作量,该技术保存的文件。

I have just discovered the 9-Patch PNG (somefile.9.png) while working on an android app and I was quite amazed by the amount of work & files that this technology saves.

有没有办法在常规浏览器上实现这种技术? (使用某种jQuery插件,或一些其他方式..)。如果它将使用CSS - 这可能是真正伟大的改进...

Is there a way to implement this technology on regular browsers somehow? (using some sort of jQuery plugin, or some other way..). if it will work with CSS - that could be really great improvement...

推荐答案

border-image 来自CSS3是最接近的匹配:

border-image from CSS3 is the closest match:

  • http://www.w3.org/TR/css3-background/#border-images
  • https://developer.mozilla.org/en/CSS/-moz-border-image

浏览器支持: http://caniuse.com / border-image

一个有用的生成器: http:// border- image.com/

至于jQuery,我发现这是由Googling的jquery 9切片缩放

As far as jQuery is concerned, I found this by Googling for "jquery 9 slice scaling":

http://code.google.com/p/scale9grid/

(9切片缩放是某事的Adobe Flash术语类似

这篇关于9-Patch PNG可以用CSS在浏览器上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆