只显示一个画廊的5张缩略图

I am looking for a solution to show only the first 5 thumbnails pictures of a gallery.

Right now I have a big picture and beneath it all pictures as thumbnails. Clicking on the thumbnail will open a popup gallery slideshow.

I want to limit the visible thumbnail pictures on the page to max 5 and hide the others.

Does anybody know a way to accomplish this?

You should provide some of your code so we can help you the best. but the simple way to do it by: overflow: hidden; with specific width example:

.thumbnails
{
    width: 200px;
    overflow: hidden;
    display: block;
}

.thumbnail 
{
    width: 40px;
    display: inline-block;
}

elements with class .thumbnails will hold the images and each image will have a class of .thumbnail

DEMO: https://jsfiddle.net/277tdp0y/1/