Monday, 7 December 2020

CSS Style Images

                                                    CSS Style Images

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Style Images</title>
    <style>
        body{
            margin25px;
            margin-bottom200px;
        }
        img.round{
            border-radius50%;
        }
        img.round:hover {

            box-shadow0px 0px 8px 10px skyblue;
        }
        
        a img.thumbnail {
            /* border: 1px solid #ddd; */
            border-radius10%;
            padding5px;
            width180px;
        }
        a img.thumbnail:hover {
            box-shadow0 0 2px 2px rgba(01401860.5);
            
        }
        img.responsive {
            max-width100%;
            heightauto;
        }
        img.center {
            marginauto;
            displayblock;
            width50%;
        }
        div.polaroid {
            marginauto;
            width50%;
            background-colorwhite;
            box-shadow0 4px 8px 0px rgba(0000.2),0 6px 8px 0px rgba(0000.19);
            /* margin-bottom: 25px;
            margin-left: 100px; */
        }
        /* div.polaroid img {
            margin-left: 270px;
        } */
        div.p{
            text-aligncenter;
            padding10px 20px;
            margin25px;
        }
        div.transparent {
            positionrelative;
        }
        div.transparent img{
            opacity0.5;
        }
        div.leftbottom {
            font-sizexx-large;
            positionabsolute;
            left10px;
            bottom56px;
        }
        div.lefttop {
            font-sizexx-large;
            positionabsolute;
            left10px;
            top16px;
        }
        div.rightbottom {
            font-sizexx-large;
            positionabsolute;
            right10px;
            bottom56px;
        }
        div.righttop {
            font-sizexx-large;
            positionabsolute;
            right10px;
            top16px;
        }
        div.centertxt {
            font-sizexx-large;
            positionabsolute;
            /* right: 348px;
            top: 248px; */
            right50%;
            top50%;
            transformtranslate(50%,50%);
            text-aligncenter;
        }
        .blur {
            filterblur(2px);
        }
        .brightness {
            filterbrightness(40%);
        }
        .contrast {
            filtercontrast(240%);
        }
        .greyscale {
            filtergrayscale(100%);
        }
        .huerotate {
            filterhue-rotate(250deg);
        }
        .invert {
            filterinvert(90%);
        }
        .opacity{
            filteropacity(40%);
        }
        .saturate {
            filtersaturate(5);
        }
        .sepia {
            filtersepia(75%);
        }
        .shadow {
            filterdrop-shadow(3px 8px 18px green);
        }
        
        .imgcontain {
            positionrelative;
            width50%;
            marginauto;
        }
        .imgcontain img {
            displayblock;
            width100%;
            heightauto;
        }
        .overlay {
            positionabsolute;
            bottom0;
            top0;
            left100%;
            right0;
            opacity0;
            width0;
            /* height: 0; */
            overflowhidden;

            transition:  1.5s ease;
            background-colorrgb(5119233);
        }
        .imgcontain:hover .overlay {
            width100%;
            opacity1;
            left0;
            transition1.5s ease;
        }
        .overlaytxt {
            positionabsolute;
            colorwhite;
            white-spacenowrap;
            font-size20px;
            top50%;
            left50%;
            /* overflow: hidden; */
            transformtranslate(-50%,-50%);

        }
        .overlay1 {
            opacity0;
            transition1.5s ease;
            positionabsolute;
            top50%;
            left50%;
            transformtranslate(-50%-50%);
            
        }
        .imgcontain:hover img {
            opacity0.3;

        }
        .imgcontain:hover .overlay1 {
            opacity1;
        }
        .fadetxt {
            background-colorgreen;
            colorwhite;
            font: size 20px ;
            padding16px 32px;
        }
        .flip:hover {
            transformscaleX(-1);
            marginauto;
            width50%;
        }
        .responsive {
            /* width: 74.9999%; */
            width100%m;
            floatleft;
            padding0 6px;
            
        }
        /* @media only screen and (max-width: 700px;) {
            .responsive {
                width: 49.9999%;
            }
        }
         @media only screen and (max-width: 500px;) {
             .responsive {
                 float: left;
                 width: 100%;
             }
         } */
        .resp1 {
            border2px solid black;
            width300px
            floatleft;
            margin-left10px;
        }
        .resp1 img {
            width100%;
        }
        .rt1 {
            text-aligncenter;
            padding20px;
        }
    </style>
</head>
<body>
    <h2>Rounded Images</h2>
    <p>Use border radius to create rounded images.</p>
    <img src="https://www.freshboo.com/wp-content/uploads/2014/06/Cool-Wallpapers.jpg" alt="Google search" class="round">
    <div>
        <h2>Thumbnail Image as link</h2>
        <a href="https://wallpaperheart.com/wp-content/uploads/2018/04/abstracts-wallpaper-cool-background-images.jpg" target="_blank" >
        <img src="https://wallpaperheart.com/wp-content/uploads/2018/04/abstracts-wallpaper-cool-background-images.jpg" alt="Google kar" class="thumbnail" width="500px">
    </a>
</div>
<div>
    <h2>Responsive Image</h2>
        <img src="https://images.hdqwalls.com/wallpapers/phoenix-the-red-bird-4k-i4.jpg" alt="Google" class="responsive">
    </div>
    <!-- Centered -->
    <div>
        <h2>Image in Center</h2>
        <img src="https://www.pxwall.com/wp-content/uploads/2019/04/4K-Phoenix-HD-Wallpapers.jpg" alt="" class="center">
    </div> <br><br>
    <!-- Polaroid /Cards like images -->
    <div class="polaroid">
        <img src="https://wallpaperboat.com/wp-content/uploads/2020/04/phoenix-wallpaper-download-full-13.jpg" alt="" style="width: 100%;">
        <div class="p">
            A Phoenix Fire
        </div>
    </div>
    <!-- Tranparent Images with text aligned on them -->
    <div class="transparent">
        <img src="https://wallpaperboat.com/wp-content/uploads/2020/04/phoenix-wallpaper-download-full-13.jpg" alt="" style="width: 100%;">
        <div class="lefttop">
            A Phoenix Fire
        </div>
        <div class="leftbottom">
            A Phoenix Fire
        </div>
        <div class="righttop">
            A Phoenix Fire
        </div>
        <div class="rightbottom">
            A Phoenix Fire
        </div>
        <div class="centertxt">
            A Phoenix Fire
        </div>
    </div> <br><hr><br> 
    <h2>Image with filter effects</h2>
    <div class="filters">
        <img src="https://avante.biz/wp-content/uploads/Nature-Backgrounds-Image/Nature-Backgrounds-Image-011.jpg" width="300px" height="auto" alt="Nature-Backgrounds-Image" class="normal">
        <img src="https://avante.biz/wp-content/uploads/Nature-Backgrounds-Image/Nature-Backgrounds-Image-011.jpg" width="300px" height="auto" alt="Nature-Backgrounds-Image" class="blur">
        <img src="https://avante.biz/wp-content/uploads/Nature-Backgrounds-Image/Nature-Backgrounds-Image-011.jpg" width="300px" height="auto" alt="Nature-Backgrounds-Image" class="brightness">
        <img src="https://avante.biz/wp-content/uploads/Nature-Backgrounds-Image/Nature-Backgrounds-Image-011.jpg" width="300px" height="auto" alt="Nature-Backgrounds-Image" class="contrast">
        <img src="https://avante.biz/wp-content/uploads/Nature-Backgrounds-Image/Nature-Backgrounds-Image-011.jpg" width="300px" height="auto" alt="Nature-Backgrounds-Image" class="greyscale">
        <img src="https://avante.biz/wp-content/uploads/Nature-Backgrounds-Image/Nature-Backgrounds-Image-011.jpg" width="300px" height="auto" alt="Nature-Backgrounds-Image" class="huerotate">
        <img src="https://avante.biz/wp-content/uploads/Nature-Backgrounds-Image/Nature-Backgrounds-Image-011.jpg" width="300px" height="auto" alt="Nature-Backgrounds-Image" class="invert">
        <img src="https://avante.biz/wp-content/uploads/Nature-Backgrounds-Image/Nature-Backgrounds-Image-011.jpg" width="300px" height="auto" alt="Nature-Backgrounds-Image" class="opacity">
        <img src="https://avante.biz/wp-content/uploads/Nature-Backgrounds-Image/Nature-Backgrounds-Image-011.jpg" width="300px" height="auto" alt="Nature-Backgrounds-Image" class="saturate">
        <img src="https://avante.biz/wp-content/uploads/Nature-Backgrounds-Image/Nature-Backgrounds-Image-011.jpg" width="300px" height="auto" alt="Nature-Backgrounds-Image" class="sepia">
        <img src="https://avante.biz/wp-content/uploads/Nature-Backgrounds-Image/Nature-Backgrounds-Image-011.jpg" width="300px" height="auto" alt="Nature-Backgrounds-Image" class="shadow">
    </div>
    <!-- Image Hover Overlay -->
        <br><br>
    <div class="imgcontain">
        <img class="myimg" src="https://cutewallpaper.org/21/cool-nature-backgrounds/Cool-Nature-Desktop-Backgrounds-57-images-DodoWallpaper..jpg"  alt="Google">
        <div class="overlay">
            <div class="overlaytxt">
                Hello World!
            </div>
        </div>
        
    </div>
     <br> <br>
    <div class="imgcontain">
        <img class="myimg" src="https://selfgrowth.info/photos/cool-nature-pictures-without-text/best-nature-wallpapers-without-copyright2784.jpg"  alt="Google">
        <div class="overlay1">
            <div class="fadetxt">
                Hello World!
            </div>
        </div>
        
    </div> <br> <br>
    <hr>
    <div >
        Hovr on the image below and check it make it as a flip  <br>
        <img src="https://cdn.wallpapersafari.com/41/9/cE1nV0.jpg" width="50%" alt="Google" class="flip">
    </div>
    <div class="responsive">
        <div class="resp1">
            <img src="https://cdn.wallpapersafari.com/41/9/cE1nV0.jpg" alt="">
            <div class="rt1">This is a responsive image gallary.</div>
        </div>
        <div class="resp1">
            <img src="https://cdn.wallpapersafari.com/41/9/cE1nV0.jpg" alt="">
            <div class="rt1">This is a responsive image gallary.</div>
        </div>
        <div class="resp1">
            <img src="https://cdn.wallpapersafari.com/41/9/cE1nV0.jpg" alt="">
            <div class="rt1">This is a responsive image gallary.</div>
        </div>
        <div class="resp1">
            <img src="https://cdn.wallpapersafari.com/41/9/cE1nV0.jpg" alt="">
            <div class="rt1">This is a responsive image gallary.</div>
        </div>
        <div class="resp1">
            <img src="https://cdn.wallpapersafari.com/41/9/cE1nV0.jpg" alt="">
            <div class="rt1">This is a responsive image gallary.</div>
        </div>
    </div>
</body>
</html>


 

No comments:

Post a Comment

Get Phone Number Details Using Python

 Get Phone Number Details Using Python Import Python module PHONENUMBERS using command " pip install phonenumbers" in you CLI Then...