运行 ❯
获取您
自己
的网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> #borderimg1 { border: 15px solid transparent; padding: 15px; border-image-source: url(border.png); border-image-repeat: stretch; border-image-slice: 30; } #borderimg2 { border: 15px solid transparent; padding: 15px; border-image-source: url(border.png); border-image-repeat: repeat; border-image-slice: 30; } #borderimg3 { border: 15px solid transparent; padding: 15px; border-image-source: url(border.png); border-image-repeat: round; border-image-slice: 30; } #borderimg4 { border: 15px solid transparent; padding: 15px; border-image-source: url(border.png); border-image-repeat: space; border-image-slice: 30; } </style> </head> <body> <h1>The border-image-repeat Property</h1> <p>The border-image-repeat property specifies whether the border image should be repeated, rounded, spaced or stretched:</p> <h2>border-image-repeat: stretch (default):</h2> <p id="borderimg1">Here, the image is stretched to fill the area.</p> <h2>border-image-repeat: repeat:</h2> <p id="borderimg2">Here, the image is tiled to fill the area. Tiles are divided if necessary.</p> <h2>border-image-repeat: round:</h2> <p id="borderimg3">Here, the image is tiled to fill the area. The image is rescaled if necessary, to avoid dividing tiles.</p> <h2>border-image-repeat: space:</h2> <p id="borderimg4">Here, the image is tiled to fill the area. Extra space is distributed around the tiles if necessary.</p> <p>Here is the original image:</p> <img src="border.png"> </body> </html>