当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


CSS quotes属性用法及代码示例


此属性用于为句子中使用的引号指定引号。

用法:

quotes:none|string;

属性值:

  • none:它是默认值。它不会产生任何引号。
    用法:
    quotes:none;

    例:



    <!DOCTYPE html> 
    <html> 
        <head> 
            <title> 
                CSS | quotes Property 
            </title> 
            <style> 
                #geeks { 
                    quotes:none; 
                } 
            </style> 
        </head> 
        <body> 
            <center> 
            <h1 style="color:green;">GeeksForGeeks</h1> 
            <h2 style="color:green;">quotes:none;</h2> 
            <p><q id="geeks">geeksforgeeks.</q></p> 
            </center> 
        </body> 
    </html>                    

    输出:

  • string:此属性用于指定句子中应使用哪种引号。前两个值指示引号标记的第一级。后两个值表示引号的第二级。

    用法:

    quotes:string;

    例:

    <!DOCTYPE html> 
    <html> 
        <head> 
            <title> 
                CSS | quotes Property 
            </title> 
            <style> 
                #geeks { 
                    quotes:'‹' '›'; 
                } 
                #gfg { 
                    quotes:'«' '»'; 
                } 
                #sudo { 
                    quotes:'‹' '›' '«' '»' ;} 
                #g { 
                    quotes:'‘' '’' ;} 
                #f { 
                    quotes:'”' '„'; 
                } 
                #for { 
                    quotes:'\2039' '\203A'; 
                } 
                #data { 
                    quotes:'\''00AB' 
                           '\00BB'; 
                } 
                #q { 
                    quotes:'\2039' '\203A'  
                           '\00AB'  
                           '\00BB'; 
                } 
                #google { 
                    quotes:'\2018' '\2019'; 
                } 
                #mark{ 
                    quotes:'\201D' '\201E';} 
                h4 { 
                    color:green; 
                } 
                  
            </style> 
        </head> 
        <body> 
            <center> 
                <h1 style="color:green;">GeeksForGeeks</h1> 
                <h2 style="color:green;">quotes:string;</h2> 
                <h4> 
                    <p><q id="geeks">geeksforgeeks.</q></p> 
                    <p><q id="gfg">geeksforgeeks.</q></p> 
                    <p><q id="sudo">geeksforgeeks.</q></p> 
                    <p><q id="q">geeksforgeeks.</q></p> 
                    <p><q id="f">geeksforgeeks.</q></p> 
                    <p><q id="for">geeksforgeeks.</q></p> 
                    <p><q id="data">geeksforgeeks.</q></p> 
                    <p><q id="google">geeksforgeeks.</q></p> 
                    <p><q id="mark">geeksforgeeks.</q></p> 
                </h4> 
            </center> 
        </body> 
    </html>                    

    输出:

支持的浏览器:下面列出了用引号引起来的浏览器:

  • 谷歌浏览器11.0
  • Internet Explorer 8.0
  • Firefox 1.5
  • Opera 4.0
  • Safari 5.1




相关用法


注:本文由纯净天空筛选整理自ManasChhabra2大神的英文原创作品 CSS | quotes Property。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。