border-image url
引用img文件的路径:
图片在img文件夹
css文件在css文件夹
border-image:url(../img/border.png) 30 30 round;
路径用
<!DOCTYPE html>
<html><head>
<style>
div
#imgRound
{
-moz-border-image:url(../img/border.png) 30 30 round; /* Old Firefox */
border-image:url(../img/border.png) 30 30 round;
}
#imgStretch
{
border-image:url(../img/pngPhote.png) 70 50 stretch;
}
</style>
</head>
<body>
<div id="imgRound">this is a round image here</div>
</br>
<div id="imgStretch">this is a stretch photo</div>
</br>
</body>
</html>