- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to create a thumbnail image CSS?
Following is the code to create a thumbnail image using CSS −
Example
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style> img { border: 3px solid rgb(208, 255, 0); border-radius: 4px; width: 150px; height: 150px; } img:hover { box-shadow: 2px 2px 4px 2px rgb(60, 255, 53); } </style> </head> <body> <h1>Thumbnail Image Example</h1> <a target="_blank" href="https://images.pexels.com/photos/34950/pexels-photo.jpg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940"> <img src="https://images.pexels.com/photos/34950/pexels-photo.jpg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940"/></a> <h1>Clicking on the above thumbnail will open image in new tab</h1> </body> </html>
Output
The above code will produce the following output −
Advertisements