在HTML中模拟圣经经文布局

时间:2016-03-06 13:44:43

标签: html mediawiki

我试图模仿维基的精通布局,其中每一行中出现的第一节经文都显示在每一行之前。这甚至可以用基本HTML吗?

http://jsfiddle.net/ukfpj2o8/It

<div style="margin-left:2em"><span style="color:#2E8B57; float:left; text-align:right; margin-left:-3em; width:2.5em;" id="I.">I.</span> IN the beginning God made the heaven and the earth. <span style="color:#2E8B57; float:left; text-align:right; margin-left:-3em; width:2.5em;" id="I.">2</span> And the earth was invisible and unfurnished and there was darkness over this abyss; and a breath of God was brought on above the water. <span style="color:#2E8B57; float:left; text-align:right; margin-left:-3em; width:2.5em;" id="I.">3</span> And God said, "Let there be Light;" and there was light. And God saw the light that it was good. <span style="color:#2E8B57; float:left; text-align:right; margin-left:-3em; width:2.5em;" id="I.">4</span>And God made a separation between the light and the darkness. <span style="color:#2E8B57; float:left; text-align:right; margin-left:-3em; width:2.5em;" id="I.">5</span>And God called the light day; and the darkness he called night. And there was an evening and there was a morning. The first day.</div>

我希望有人可以提供帮助 感谢

1 个答案:

答案 0 :(得分:0)

我想出了一些可以满足我需要的目的。通过添加白色背景,我摆脱了浮动诗句数字的重叠,并且通过使用z-index,我可以在行显示中创建第一节,而不是默认显示的最后一节。这是每节经文之前使用的跨度,例如第1节

<span style="color:#2E8B57; background-color:#FFFFFF; position:relative; z-index:99; font-size:small; float:left; text-align:right; margin-left:-3em; width:2.5em;">1</span>

第2节的z-index值为98,第3节,97等