Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> CSS

กำหนด border-image ให้เป็น rounded, repeated และ stretched ด้วย CSS


คุณสมบัติ border-image-repeat ใช้เพื่อกำหนดการแสดงภาพขอบ (border image) ให้เป็น rounded, repeated หรือ stretched

ตัวอย่าง

ลองรันโค้ดด้านล่างเพื่อใช้งานคุณสมบัติ border-image-repeat:

<html>
  <head>
    <style>
      #borderimg1 {
        border: 15px solid transparent;
        padding: 15px;
        border-image-source: url(https://tutorialspoint.com/css/images/border.png);
        border-image-repeat: round;
        border-image-slice: 40;
        border-image-width: 20px;
      }
    </style>
  </head>
  <body>
    <p id="borderimg1">This is image border example.</p>
  </body>
</html>