當前位置: 首頁>>代碼示例 >>用法及示例精選 >>正文


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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。