Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 好极了!但它仍然增加了一个换行符,所以人们会认为有一个新的诗节。如果数字能与它所指的同一条线保持一致,并且没有任何中断,那就更好了。可能吗?:-)更新了JSFIDLE,现在数字应该和诗句在同一行。太棒了,这很有帮助!有可能去掉数字后面的圆点吗?这不是一个大_Css_Html - Fatal编程技术网

Css 好极了!但它仍然增加了一个换行符,所以人们会认为有一个新的诗节。如果数字能与它所指的同一条线保持一致,并且没有任何中断,那就更好了。可能吗?:-)更新了JSFIDLE,现在数字应该和诗句在同一行。太棒了,这很有帮助!有可能去掉数字后面的圆点吗?这不是一个大

Css 好极了!但它仍然增加了一个换行符,所以人们会认为有一个新的诗节。如果数字能与它所指的同一条线保持一致,并且没有任何中断,那就更好了。可能吗?:-)更新了JSFIDLE,现在数字应该和诗句在同一行。太棒了,这很有帮助!有可能去掉数字后面的圆点吗?这不是一个大,css,html,Css,Html,好极了!但它仍然增加了一个换行符,所以人们会认为有一个新的诗节。如果数字能与它所指的同一条线保持一致,并且没有任何中断,那就更好了。可能吗?:-)更新了JSFIDLE,现在数字应该和诗句在同一行。太棒了,这很有帮助!有可能去掉数字后面的圆点吗?这不是一个大问题,只是问…你做的是像其他人一样把这首诗分成几部分。我不需要节,但实际的行计数,如5,10,15等。这将是伟大的,如果计数器是在一个垂直的线,在右边,有点远离诗,以免妨碍读者的方式。有没有可能用JS做到这一点?哦,是的,我明白了,它太复杂了,


好极了!但它仍然增加了一个换行符,所以人们会认为有一个新的诗节。如果数字能与它所指的同一条线保持一致,并且没有任何中断,那就更好了。可能吗?:-)更新了JSFIDLE,现在数字应该和诗句在同一行。太棒了,这很有帮助!有可能去掉数字后面的圆点吗?这不是一个大问题,只是问…你做的是像其他人一样把这首诗分成几部分。我不需要节,但实际的行计数,如5,10,15等。这将是伟大的,如果计数器是在一个垂直的线,在右边,有点远离诗,以免妨碍读者的方式。有没有可能用JS做到这一点?哦,是的,我明白了,它太复杂了,不能用超过3000行的史诗。。。那么JS的替代方案是什么?有什么简单的吗?
<head>
<title>Beowulf</title>
    <style type="text/css">

    body {padding: 10% 25%;}
    pre {font-family: "Times New Roman";  font-size: 100%;} 

</style>
</head> 

<body>
<h3>Beowulf</h3><br>

<pre>Now Beowulf bode in the burg of the Scyldings,
leader beloved, and long he ruled
in fame with all folk, since his father had gone
(...)
of furious flame. Nor far was that day
when father and son-in-law stood in feud
for warfare and hatred that woke again. (...)</pre>
</body>
$(function() {
    var text = $('pre').text(),
        textLines = text.split(/\n/g),
        index = 1,
        occurance = 5,
        paragraphNumber = occurance,
        output = '<div>1</div>';

    textLines.forEach(function(entry, arrayIndex) {
        if (arrayIndex > 0) {
            output += '<br />';
        }

        if (index === occurance) {
            output += '<div>'+paragraphNumber+'</div>'+entry;
            index = 1;
            paragraphNumber += occurance;
            return;
        } else {
            output += entry;
        }
        index++;
    });

    $('pre').html(output);
});
pre {
    width: 400px;
}

pre div {
    float: right;
}
1Now Beowulf bode in the burg of the Scyldings,
leader beloved, and long he ruled
in fame with all folk, since his father had gone
away from the world, till awoke an heir,
5haughty Healfdene, who held through life,
sage and sturdy, the Scyldings glad.
Then, one after one, there woke to him,
to the chieftain of clansmen, children four:
Heorogar, then Hrothgar, then Halga brave;
10and I heard that -- was -- 's queen,
the Heathoscylfing's helpmate dear.
To Hrothgar was given such glory of war,
such honor of combat, that all his kin
obeyed him gladly till great grew his band
15of youthful comrades. It came in his mind
to bid his henchmen a hall uprear,
ia master mead-house, mightier far
than ever was seen by the sons of earth,
and within it, then, to old and young
20he would all allot that the Lord had sent him,
save only the land and the lives of his men.
Wide, I heard, was the work commanded,
for many a tribe this mid-earth round,
to fashion the folkstead. It fell, as he ordered,
25in rapid achievement that ready it stood there,
of halls the noblest: Heorot he named it
whose message had might in many a land.
Not reckless of promise, the rings he dealt,
treasure at banquet: there towered the hall,
30high, gabled wide, the hot surge waiting
of furious flame. Nor far was that day
when father and son-in-law stood in feud
for warfare and hatred that woke again. (...)