我创建了一个脚本,该脚本可以在表格中动态插入包含内容的表格行。问题是,我在单元格内使用<span>
and<a>
标记来显示多章条目。如果视口太小,而不是换行,元素只会溢出单元格,从而被作者姓名覆盖。
网站链接:http ://hunpony.hu/hunfic/
插入的动态 HTML(示例):
<span class="chapter-list">
<a href="https://sites.google.com/site/ponydocs/home/nite/eljonek-az-unnepek/prologus" target="_blank" data-hasqtip="true" oldtitle="Prológus" title="">Pr</a>
<a href="https://sites.google.com/site/ponydocs/home/nite/eljonek-az-unnepek/i" target="_blank" data-hasqtip="true" oldtitle="1. fejezet" title="">1</a>
<a href="https://sites.google.com/site/ponydocs/home/nite/eljonek-az-unnepek/ii" target="_blank" data-hasqtip="true" oldtitle="2. fejezet" title="">2</a>
<a href="https://sites.google.com/site/ponydocs/home/nite/eljonek-az-unnepek/iii" target="_blank" data-hasqtip="true" oldtitle="3. fejezet" title="">3</a>
<a href="https://sites.google.com/site/ponydocs/home/nite/eljonek-az-unnepek/iv" target="_blank" data-hasqtip="true" oldtitle="4. fejezet" title="">4</a>
<a href="https://sites.google.com/site/ponydocs/home/nite/eljonek-az-unnepek/v" target="_blank" data-hasqtip="true" oldtitle="5. fejezet" title="">5</a>
<a href="https://sites.google.com/site/ponydocs/home/nite/eljonek-az-unnepek/vi" target="_blank" data-hasqtip="true" oldtitle="6. fejezet" title="">6</a>
<a href="https://sites.google.com/site/ponydocs/home/nite/eljonek-az-unnepek/vii" target="_blank" data-hasqtip="true" oldtitle="7. fejezet" title="">7</a>
<a href="https://sites.google.com/site/ponydocs/home/nite/eljonek-az-unnepek/viii" target="_blank" data-hasqtip="true" oldtitle="8. fejezet" title="">8</a>
<a href="https://sites.google.com/site/ponydocs/home/nite/eljonek-az-unnepek/epilogus" target="_blank" data-hasqtip="true" oldtitle="Epilógus" title="">Ep</a>
<a href="https://sites.google.com/site/ponydocs/home/nite/eljonek-az-unnepek/elmulnak-az-unnepek" target="_blank" data-hasqtip="true" oldtitle="Utószó" title="">Usz</a>
</span>
一些 CSS 规则:
td.title .chapter-list {
list-style:none;
padding:0;
margin:0;
font-variant: small-caps;
white-space: nowrap;
padding-right:0;
}
td.title .chapter-list:before { content: "(fejezetek: " }
td.title .chapter-list:after { content: ")" }
td.title .chapter-list a {
white-space: nowrap;
margin:0px 3px;
padding-bottom:0;
}
td.title .chapter-list a:after { content:", " }
td.title .chapter-list a:last-child:after { content: "" !important }