How To Create Thumbnail Images Using CSS With Example

admin_img Posted By Bajarangi soft , Posted On 06-11-2020

Use CSS border property to create thumbnail images. So today we discuss how to do it.

How To Create Thumbnail Images Using CSS With Example

Implement Code For Creating Thumbnail Images Using CSS.

<style>
    body {
        background: #ffcccc;
    }

    .img1 {
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 5px;

    }
    .img2 {
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 5px;

    }

    .img2:hover {
        box-shadow: 0 0 2px 1px rgba(0, 140, 186, 0.5);
    }
</style>


Complete Code For Creating Thumbnail Images Using CSS 
<!DOCTYPE html>
<html>
<head>
    <title>How To Create Thumbnail Images Using CSS With Example</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"/>
</head>
<style>
    body {
        background: #ffcccc;
    }

    .img1 {
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 5px;

    }
    .img2 {
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 5px;

    }

    .img2:hover {
        box-shadow: 0 0 2px 1px rgba(0, 140, 186, 0.5);
    }
</style>
<body>
<br/><br/>
<div class="container">
    <br>
    <div class="text-center">
        <h1 id="color" style="color: black;">Thumbnail Images Using CSS </h1>
    </div>
    <br>
    <div class="well">
        <img class="img1" src="../image/demo6.jpg" alt="nature" width="220" height="200">

        <a target="_blank" href="#">
            <img class="img2" src="../image/demo7.jpg" alt="nature" width="220" height="200">
        </a>
        <img class="img1" src="../image/demo5.jpg" alt="nature" width="220" height="200">
    </div>
</div>
</body>
</html>

Related Post