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

ตัดภาพขอบ (Slice border image) ด้วย CSS border-image-slice


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

ตัวอย่าง

<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;
      }
    </style>
  </head>
  <body>
    <p id="borderimg1">This is image border example.</p>
  </body>
</html>