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

กำหนดความกว้างของเส้นขอบของรูปภาพด้วย CSS


คุณสมบัติ border-image-width ใช้เพื่อกำหนดความกว้างของรูปภาพเส้นขอบด้วย CSS

ตัวอย่าง

คุณสามารถลองใช้รหัสต่อไปนี้เพื่อใช้คุณสมบัติ border-image-width -

<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>