16 附录 B:增强排版功能支持的属性和标签
16.1 支持的属性
16.2 支持的标记
16.3 被忽略的标签
16.3.1 被忽略的 HTML 标记
16.3.2 被忽略的属性
16.3.3 应用到特定 HTML 标签时会被忽略的标签
16 附录 B:增强排版功能支持的属性和标签
增强排版功能支持众多标签和属性。
16.1 支持的属性
目前支持以下属性,其值如下所示。
HTML 标签属性 | 支持的值 |
---|---|
background-clip | border-box, padding-box, content-box |
background-color | 任何适用的值 |
background-origin | border-box, padding-box, content-box |
background-position | 任何适用的值 |
background-position-x | 任何适用的值 |
background-position-y | 任何适用的值 |
background-repeat | 任何适用的值 |
background-repeat-x | 任何适用的值 |
background-repeat-y | 任何适用的值 |
background-size | 任何适用的值 |
background-sizex | px, pt, cm, mm, em, ex, %, in |
background-sizey | px, pt, cm, mm, em, ex, %, in |
border-bottom-color | 任何适用的值 |
border-bottom-left-radius | pt, px, cm, %, ex, in, mm, em, rem |
border-bottom-right-radius | in, px, ex, pt, %, em, cm, mm, rem |
border-bottom-style | hidden, solid, dotted, dashed, double, ridge, groove, inset, outset |
border-bottom-width | mm, in, ex, px, pt, em, cm, rem |
border-collapse | 卷起、分隔 |
border-color | 任何适用的值 |
border-left-color | 任何适用的值 |
border-left-style | hidden, solid, dotted, dashed, double, ridge, groove, inset, outset |
border-left-width | mm, in, ex, px, pt, em, cm, rem |
border-right-color | 任何适用的值 |
border-right-style | hidden, solid, dotted, dashed, double, ridge, groove, inset, outset |
border-right-width | mm, in, ex, px, pt, em, cm, rem |
border-style | hidden, solid, dotted, dashed, double, ridge, groove, inset, outset |
border-top-color | 任何适用的值 |
border-top-left-radius | pt, px, ex, cm, mm, em, %, in, rem |
border-top-right-radius | %, cm, em, pt, ex, px, in, mm |
border-top-style | hidden, solid, dotted, dashed, double, ridge, groove, inset, outset |
border-top-width | mm, in, ex, px, pt, em, cm, rem |
border-vertical-spacing | mm, in, ex, em, cm, px, pt, %, rem |
border-width | mm, in, ex, px, pt, em, cm, rem |
box-align | right, left, center |
box-shadow | 任何适用的值 |
box-sizing | border-box, padding-box, content-box |
clear | left, right, both |
color | 任何适用的值 |
column-rule-color | 任何适用的值 |
dir | rtl, ltr |
display | inline, block, flex, inline flex, table cell, inherit, list-item |
empty-cells | hide |
float | left, right |
font-family | 任何适用的值 |
font-size | mm, in, ex, em, rem, cm, px, pt, % |
font-style | normal, italic, oblique |
font-variant | normal, small-caps |
font-weight | 100, 200, 300, 400, 500, 600, 700, 800, 900, normal, bold, bolder, lighter |
height | mm, in, ex, em, cm, px, pt, %, rem |
hyphens | auto, manual |
letter-spacing | normal, mm, in, ex, em, rem, cm, px, pt |
line-height | normal, mm, in, em, cm, px, pt, % |
list-style-position | outside, inside |
list-style-type | disc, square, circle, decimal, lower-roman, upper-roman, lower-latin, upper-latin, lower-alpha, upper-alpha |
margin | mm, in, em, cm, px, pt, %, rem |
margin-after | mm, in, em, cm, px, pt, %, rem |
margin-before | mm, in, em, cm, px, pt, %, rem |
margin-bottom | mm, in, em, cm, px, pt, %, auto, rem |
margin-left | mm, in, em, cm, px, pt, %, auto, rem |
margin-right | mm, in, em, cm, px, pt, %, auto, rem |
margin-top | mm, in, em, cm, px, pt, %, auto, rem |
min-height | mm, in, em, cm, px, pt, %, rem |
opacity | 任何适用的值 |
outline-color | 任何适用的值 |
outline-offset | mm, in, ex, em, cm, px, pt, % |
outline-style | solid, dotted, dashed, double, ridge |
outline-width | mm, in, ex, em, cm, px, pt, % |
overflow | hidden |
overflow-x | hidden |
overflow-y | hidden |
padding | mm, in, em, cm, px, pt, %, rem |
padding-bottom | mm, in, em, cm, px, pt, %, rem |
padding-left | mm, in, em, cm, px, pt, %, rem |
padding-right | mm, in, em, cm, px, pt, %, rem |
padding-top | mm, in, em, cm, px, pt, %, rem |
page-break-after | left, right, always |
page-break-before | left, right, always |
text-align | left, right, center, justify |
text-decoration | line-through, overline, underline |
text-fill-color | 任何适用的值 |
text-indent | mm, in, ex, em, cm, px, pt, %, rem |
text-shadow | 任何适用的值 |
text-stroke-color | 任何适用的值 |
text-transform | lowercase, uppercase, capitalize |
transform | 任何适用的值 |
unicode-bidi | bidi-override, normal, embed, initial, isolate, isolate-override & plaintext |
vertical-align | sub, super, top, text-top, middle, bottom, text-bottom, baseline, mm, in, ex, px, pt, em, cm, % |
visibility | visible |
white-space | nowrap, normal |
width | auto, mm, in, ex, em, cm, px, pt, %, rem |
word-break | normal, keep-all, break-all |
word-spacing | normal, mm, in, ex, em, rem, cm, px, pt |
16.2 支持的标记
任何含有“任何适用的属性”或“任何适用的值”文字的标签均支持第 16.1 节中指定的属性和值。
HTML 标签 | HTML 属性 | 支持的值 |
a | epub:type, data-app-amzn-magnify, href | noteref |
address | 任何适用的属性 | 任何适用的值 |
aside | epub:type | footnote |
b | 任何适用的属性 | 任何适用的值 |
bdi | 任何适用的属性 | 任何适用的值 |
bdo | 任何适用的属性 | 任何适用的值 |
blockquote | 任何适用的属性 | 任何适用的值 |
body | bgcolor | 任何适用的值 |
body | text | 任何适用的值 |
caption | align | center, justify |
center | 任何适用的属性 | 任何适用的值 |
cite | 任何适用的属性 | 任何适用的值 |
code | 任何适用的属性 | 任何适用的值 |
col | span | 任何适用的值 |
col | width | %, px |
dd | 任何适用的属性 | 任何适用的值 |
del | 任何适用的属性 | 任何适用的值 |
div | align | center, left, right, justify |
div | epub:type | footnote |
dl | 任何适用的属性 | 任何适用的值 |
em | 任何适用的属性 | 任何适用的值 |
figure | 任何适用的属性 | 任何适用的值 |
h1 | align | center, left, right, justify |
h2 | align | center, left, right, justify |
h3 | align | center, left, right, justify |
h4 | align | center, left, right, justify |
h5 | align | center, left, right, justify |
h6 | align | center, left, right, justify |
hr | align | center, left, right |
hr | noshade | 任何适用的值 |
hr | size | px |
hr | width | px, % |
i | 任何适用的属性 | 任何适用的值 |
image | height | %, px, em, pt |
image | width | %, px, em, pt |
img | align | center, middle, top, bottom, absbottom, absmiddle |
Img | alt | 任何适用的值 |
img | border | px, pt, cm, mm, em, rem, ex, in, % |
img | height | %, px, em, pt |
img | hspace | px |
img | vspace | px |
img | width | %, px, em, pt |
li | type | a, i, disc, square, circle |
li | value | 任何适用的值 |
listing | 任何适用的属性 | 任何适用的值 |
mark | 任何适用的属性 | 任何适用的值 |
ol | start | 任何适用的值 |
ol | type | a, i |
p | align | center, left, right, justify |
p | epub:type | footnote |
plaintext | 任何适用的属性 | 任何适用的值 |
pre | 任何适用的属性 | 任何适用的值 |
s | 任何适用的属性 | 任何适用的值 |
samp | 任何适用的属性 | 任何适用的值 |
strike | 任何适用的属性 | 任何适用的值 |
strong | 任何适用的属性 | 任何适用的值 |
table | align | center, left, right |
table | bgcolor | 任何适用的值 |
table | width | %, px |
tbody | align | center, left, right, justify |
td | align | center, left, right, justify |
td | bgcolor | 任何适用的值 |
td | colspan | 任何适用的值 |
td | height | %, px |
td | rowspan | 任何适用的值 |
td | vertical-align | center, middle, top, bottom |
td | width | %, px |
tfoot | align | center, left, right, justify |
th | align | center, left, right, justify |
th | bgcolor | 任何适用的值 |
th | colspan | 任何适用的值 |
th | height | %, px |
th | rowspan | 任何适用的值 |
th | vertical-align | center, middle, top, bottom |
th | Width | %, px |
thead | Align | center, left, right, justify |
thead | Bgcolor | 任何适用的值 |
tr | Align | center, left, right, justify |
tr | Bgcolor | 任何适用的值 |
tt | 任何适用的属性 | 任何适用的值 |
ul | 任何适用的属性 | 任何适用的值 |
var | 任何适用的属性 | 任何适用的值 |
xmp | 任何适用的属性 | 任何适用的值 |
16.3 被忽略的标签
如果电子书含有被忽略的标签,不会禁用增强排版功能;系统会在电子书使用增强排版功能时忽略这些标签。
16.3.1 被忽略的 HTML 标记
目前,我们会忽略以下标签(无论其属性、单位或应用的值为何)。
area | kbd | max-width | small |
big | map | mbp:nu | time |
ins | max-height | reference |
16.3.2 被忽略的属性
目前,以下属性在应用到任何 HTML 标签时会被忽略。
accesskey | dropcap | page |
animation | dropcap_chars | page-break-inside |
animation-delay | dropcap_lines | pointer-events |
animation-direction | font-smoothing | speak |
animation-duration | handlersprocessed | src |
animation-fill-mode | hyphenate-character | tabindex |
animation-iteration-count | hyphenate-limit-after | table-layout |
animation-name | hyphenate-limit-before | text-combine |
animation-play-state | initial | text-decorations-in-effect |
animation-timing-function | line-box-contain | text-rendering |
background-attachment | line-break | text-size-adjust |
class | min-width | title |
column-break-before | nbsp-mode | transition-delay |
column-count | none | transition-duration |
column-gap | onclick | transition-property |
column-width | onload | transition-timing-function |
cursor | onreset | user-select |
data-ichitaro-para-stylename | onsubmit | widows |
data-mappingid | ordinal | word-wrap |
datetime | orphans |
16.3.3 应用到特定 HTML 标签时会被忽略的标签
HTML 标签 | 样式属性 |
a | rel, rev, shape, name, target, type |
applet | hspace, height, name, width, vspace, align, alt |
body | bottommargin, link, rightmargin, vlink |
button | value, name, type |
div | node-type, type |
frame | name |
html | xmlns, encoding, version |
iframe | name, align, width, height |
image | xlink:href |
img | name, usemap |
input | align |
link | type, media, rel, href |
meta | name, http-equiv |
object | name, width, hspace, align, type, border, vspace, height |
param | value, type, name |
script | type, for |
style | type, media |
请问kingle oasis 2017里面拷进去一本自己下载的书,点右下角的时候出现“编辑发音”的选项,进去以后就是书名和作者的拼音可以自行编辑,这是干嘛用的?
确认一下,你点击的是否是“电子书”而不是“收藏夹”?貌似只有“收藏夹”有这个“编辑发音”的选项。这个功能没有特别用途,可能只是用于语音辅助。