编辑下面的代码:【加编码】
<html> <head> <style> div { border:10px solid transparent; width:40px; padding:5px 10px; -moz-border-image: url(button.png) 0 14 0 14 stretch; /* Old Firefox */ -webkit-border-image: url(button.png) 0 14 0 14 stretch; /* Safari */ -o-border-image: url(button.png) 0 14 0 14 stretch; /* Opera */ border-image: url(button.png) 0 14 0 14 stretch; } </style> </head> <body> <p><b>注意:</b> Internet Explorer 浏览器不支持 border-image 属性。</p> <div>Search</div> <p>这是使用的图片:</p> <img src="/demo/button.png"> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂