我使用border-image標記在css中創建自定義邊框。 我使用的背景顏色與邊框顏色相同。但它不能填滿整個身高。自定義邊框css和背景圖像
<!DOCTYPE html>
<html>
<head>
<style>
div{
border:15px solid transparent;
width:250px;
}
div p {
background-color: #74c7a9;
padding-right: 20px;
padding-bottom: 20px;
}
#round {
-webkit-border-image:url(border2.png) 30 30 round; /* Safari 5 */
-o-border-image:url(border2.png) 30 30 round; /* Opera */
border-image:url(border2.png) 30 30 round;
}
</style>
</head>
<body>
<div id="round">
<p>Here, the image is tiled (repeated) to fill the area.
</p>
</div>
</body>
</html>