📜  CSS |形状边缘属性

📅  最后修改于: 2021-08-31 07:24:19             🧑  作者: Mango

shape-margin属性用于设置由 shape-outside 属性创建的形状的边距。此边距用于调整形状边缘与周围内容之间的空间。

句法:

shape-margin:  | 

属性值:

  • length:用于设置测量单位的边距。它还可以采用整数或小数形式的值。

    示例:此示例以像素为单位设置边距。

    
    
       
    
        
            CSS | shape-margin
        
        
    
       
    
        

            GeeksforGeeks     

                 CSS | shape-margin: length;          

            shape-margin: 10px     

        
            
        
        
          GeeksforGeeks is a computer science portal with a huge        variety of well written and explained computer science       and programming articles, quizzes and interview questions.        The portal also has dedicated GATE preparation and competitive       programming sections.       
          
            GeeksforGeeks is a computer science portal with a huge        variety of well written and explained computer science        and programming articles, quizzes and interview questions.       The portal also has dedicated GATE preparation and competitive       programming sections.     
       

    输出:

    价值观

  • 百分比:用于设置百分比值的边距。百分比基于元素的包含块的宽度。

    例子:

    
    
      
    
        
            CSS | shape-margin
        
        
    
      
    
        

            GeeksforGeeks     

                 CSS | shape-margin: percentage;          

            shape-margin: 5%     

        
            
        
        
          GeeksforGeeks is a computer science portal with a huge        variety of well written and explained computer science       and programming articles, quizzes and interview questions.        The portal also has dedicated GATE preparation and competitive       programming sections.       
          
            GeeksforGeeks is a computer science portal with a huge        variety of well written and explained computer science        and programming articles, quizzes and interview questions.       The portal also has dedicated GATE preparation and competitive       programming sections.     
      

    输出:

    百分比

支持的浏览器: shape-margin属性支持的浏览器如下:

  • 谷歌浏览器 37
  • 火狐 62
  • Safari 10.1
  • 歌剧24