06 HTML -Menu- Buttons HTML record

 STYLE THE MENU BUTTONS USING CSS CODE:

PROGRAM:-6

Save:- html_menu_button6.html

<html>
    <head>
        <title>ON & OFF BULB</title>
        <style type="text/css">
            body {
                padding: 50px;
                background: #f2f2f2;
            }
            h1 {
                 color: #808080d6;
                 letter-spacing: 0.2em;
            }
            #bulbImg {
                width: 200px;
                margin: 40px;
            }
            .container {
                text-align: center;
            }
            .container {
                box-shadow: 5px 5px 25px 0px rgba(46,61,73,0.2);
                padding: 20px;
                background: #fff;
                border-radius: 0.375rem;
            }
            #bulb-button {
                   display: block;
                  margin-left: auto;
                  margin-right: auto;
                  padding: 15px;
                box-shadow: 4px 4px 4px 0 rgba(46, 61, 73, 0.13);
                border-radius: 0.25rem;
                letter-spacing: 0.09375rem;
                background: #fff;
            }           
        </style>
        <script>
            var state = 0;
            function changeBulbImage()
            {
            if (state == 1)
                {
                    document.getElementById("bulbImg").src="images/off.gif";
                    state = 0;
                } else
                {
                    document.getElementById("bulbImg").src="images/on.gif";
                    state = 1;
                }
            }           
        </script>           
    </head>
    <body>
        <div class="container">
           
            <img id="bulbImg" src="images/off.gif" alt="Blub">
            <button id="bulb-button" type="button" onclick="changeBulbImage()">Bulb ON/OFF</button>   
        </div>   
    </body>   
</html>

Output:-01

Output:-02

 

 

Comments

Popular posts from this blog

digital marketing ppt-u1

SOFTWARE

cn lab

Computer Operations and Performing - D L Unit-1-1

DS-Record-mca-04) write a program for evaluating a given postfix expression using stack.

Unit 2: Foundations of Ownership, Security Related Concepts in Blockchain

Unit-1 Foundations of Software Systems and Blockchain

Access the Internet to Browse Infromation & E-Mail Operation- D L Unit-2-1

DBMS Degree Lab Records

6)what are the various service of internet and protocols ICT-unit-1