使用 CSS 设置图片路径

cssweb developmentfront end technology更新于 2024/2/10 19:56:17

CSS 中使用 border-image-source 属性设置图片路径。您可以尝试运行以下代码来设置图片路径 −

示例


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

相关文章


有用资源