📜  如何使用 CSS 创建 3D 开始和插入边框?

📅  最后修改于: 2021-08-30 12:03:54             🧑  作者: Mango

在本文中,我们将使用 CSS 创建一个 3D 开始和插入边框。 Inset border 属性使内容看起来是嵌入的(在表面内),另一方面,outset 属性使内容看起来是浮雕的(在表面外)。您可以通过使用用于装饰边框的 border-style 属性来完成此任务。

3D 内嵌边框:用于定义 3D 内嵌边框,其效果取决于 border-color 值。

句法:

element_name(or selector).inset {border-style: inset;}

示例 1:

HTML


 

    

 

    

GeeksForGeeks

       

A computer science portal for geeks

        

        The content of this paragraph is         styled using inset property     

   


HTML


 

    

 

    

GeeksForGeeks

       

A computer science portal for geeks

        

        The content of this paragraph is         styled using outset property     

   


输出:

3D 起始边框:用于定义 3D 起始边框,其效果取决于边框颜色值。

句法:

element_name(or selector).outset {border-style: outset;}

示例 2:

HTML



 

    

 

    

GeeksForGeeks

       

A computer science portal for geeks

        

        The content of this paragraph is         styled using outset property     

   

输出: