使用CSS3的ruby-position固定注音位置的用法樣本介紹

來源:互聯網
上載者:User
ruby-position能在樣式上定製文字周圍的注音位置,頁面編碼設定好以後可以用來製作各種語言之間的加註翻譯效果,下面我們來看一下使用CSS3的ruby-position固定注音位置的用法樣本:

ruby-position 指定注意的位置時使用。<設定或檢索通過rt對象指定的注釋文本或發音指南(參考ruby對象)的位置。>

屬性值
1.before 注音文本會在基礎文字上面表示。(預設值)
2.after 注音文本會在基礎文字下面表示。
3.right 注音文本會在基礎文字右面表示。

執行個體代碼

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title> ruby-position </title><style>ruby.sample1 {ruby-position:before;}   ruby.sample2 {ruby-position:after;}   ruby.sample3 {ruby-position:right;}    </style></head><body><p><ruby class="sample1">新幹線<rt>しんかんせん</rt></ruby></p><p><ruby class="sample2">新淦線<rt>xinganxian</rt></ruby></p><p><ruby class="sample3">高鐵<rt>High-speed rail</rt></ruby></p></body></html>

執行個體圖

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.