How to create: thumbnails
- Προηγούμενη σελίδα Κεντρική εικόνα
- Επόμενη σελίδα Πλαίσιο εικόνας
Learn how to create thumbnails.
Thumbnails
Thumbnails are small images representing larger images (clickable), usually identified by the border around them:

How to create thumbnails
Use the <img> element and wrap it with an <a> element. Set the image style with borders and add a hover effect:
<style> img { border: 1px solid #ddd; /* Gray border */ border-radius: 4px; /* Rounded border */ padding: 5px; /* Some padding */ width: 150px; /* Set a small width */ } /* 添加悬停效果(蓝色阴影) */ img:hover { box-shadow: 0 0 2px 1px rgba(0, 140, 186, 0.5); } </style> <body> <a target="_blank" href="img_forest.jpg"> <img src="img_forest.jpg" alt="Forest"> </a> </body>
Σχετικές σελίδες
Εκμάθηση:CSS εικόνα
- Προηγούμενη σελίδα Κεντρική εικόνα
- Επόμενη σελίδα Πλαίσιο εικόνας