115S站长学院 TIY
编辑您的代码:
<!DOCTYPE html> <html> <head> <style> div { border:10px solid transparent; width:40px; padding:5px 10px; -moz-border-image: url(/i/border_image_button.png) 0 14 0 14 stretch; /* 老版本的 Firefox */ -webkit-border-image: url(/i/border_image_button.png) 0 14 0 14 stretch; /* Safari */ -o-border-image: url(/i/border_image_button.png) 0 14 0 14 stretch; /* Opera */ border-image: url(/i/border_image_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="../i/border_image_button.png" tppabs="http://zz.115s.com/i/border_image_button.png"> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?72e1eb95f3722bd737488ab37f422304"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> </body> </html>
查看结果: