文法:
ruby-position : above | inline
參數:
above : 在基本文本上方定位ruby文本
inline : ruby文本與基本文本內聯
說明:
設定或檢索通過rt對象指定的注釋文本或發音指南(參考ruby對象)的位置。
ruby對象及rt對象請參閱我的其他著作。
對應的指令碼特性為rubyPosition。請參閱我編寫的其他書目。
樣本:
ruby { ruby-position: above; }
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>
執行個體圖