图像src在数组上排序

时间:2018-11-28 01:50:40

标签: javascript html css arrays

这是一个模拟。如何将该图像存储到数组中,并按照最新图像和最相似图像进行排序。

我是否需要设置一个ID。任何帮助表示赞赏。

</style>

<figure class="einzel"><img alt="Mitglieder" src="https://unsplash.it/300/225?image=0" style="width: 315px; height: 250px;">
    <figcaption>Name:<br>
    <span>Likes:</span></figcaption>
</figure>
<figure class="einzel"><img alt="Mitglieder" src="https://unsplash.it/300/225?image=1" style="width: 315px; height: 250px;">
    <figcaption>Name:<br>
    <span>Likes:</span></figcaption>

</figure>
<figure class="einzel"><img alt="Mitglieder" src="https://unsplash.it/300/225?image=2" style="width: 315px; height: 250px;">
    <figcaption>Name:<br>
    <span>Likes:</span></figcaption>
</figure>
<figure class="einzel"><img alt="Mitglieder" src="https://unsplash.it/300/225?image=3" style="width: 315px; height: 250px;">
    <figcaption>Name:<br>
    <span>Likes:</span></figcaption>
</figure>

<figure class="einzel"><img alt="Mitglieder" src="https://unsplash.it/300/225?image=3" style="width: 315px; height: 250px;">
    <figcaption>Name:<br>
    <span>Likes:</span></figcaption>
</figure>

<figure class="einzel"><img alt="Mitglieder" src="https://unsplash.it/300/225?image=3" style="width: 315px; height: 250px;">
    <figcaption>Name:<br>
    <span>Likes:</span></figcaption>     
</figure>

0 个答案:

没有答案