主頁
CSS
CSS 樣式圖片
試一試:建立作為連結的縮圖影像
執行 ❯
建立您
自己的
網站
×
改變方向
儲存程式碼
改變主題,深色/淺色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> img { border: 1px solid #ddd; border-radius: 4px; padding: 5px; width: 150px; } img:hover { box-shadow: 0 0 2px 1px rgba(0, 140, 186, 0.5); } </style> </head> <body> <h2>Thumbnail Image as Link</h2> <p>Use the border property to create thumbnail images. Wrap an anchor around the image to use it as a link.</p> <p>Hover over the image and click on it to see the effect.</p> <a target="_blank" href="paris.jpg"> <img src="paris.jpg" alt="Paris" style="width:150px"> </a> </body> </html>