BCA

WEB PROGRAMMING LAB

PROGRAM 1 PROGRAM 2 PROGRAM 3 PROGRAM 4 PROGRAM 5 PROGRAM 6

PART B

PROGRAM 7 PROGRAM 8 PROGRAM 9 PROGRAM 10 PROGRAM 11 PROGRAM 12 PROGRAM 13 PROGRAM 14 PROGRAM 15 . . .

Create a webpage with two images which alternately changes on mouse over using CSS.

OUTPUT :
Change Image on Hover in CSS
Card Back Card Front
 


 
 CODE:
<html lang="en">
<head>
<title>Change Image on Hover in CSS</title>
<style type="text/css">
    .card {
        width: 130px;
        height: 195px;
        position: relative;
        display: inline-block;
        margin: 50px;
    }
    .card .img-top {
        display: none;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 99;
    }
    .card:hover .img-top {
        display: inline;
    }
</style>
</head>
<body>
    <div class="card">
    	<img src="im1.jpg" width=200 height=300 alt="Card Back">
        <img src="im2.jpg" width=200 height=300 class="img-top" alt="Card Front">
    </div>

<div style="display:none">
welcome
</div>

</body>
</html>