Jump to content

Responsive image with transparent textbox


Ivan MNE

Recommended Posts

<!DOCTYPE html>
<html>
  <head>
    <style>
      .class {
       color: black; 
      }
      .class:hover {
        transform: resize(3px);
      }
    </style>
  </head>
  <body>
    <button class="class" id="id">Text</button>
  </body>
</html>

or using JS

<!DOCTYPE html>
<html>
  <head>
    <style>
      body {
   		font-size: 12px;
      }
      .toggled {
        font-size: 14px;
      }
    </style>
  </head>
  <body>
    <p>This text will be toggled on button click</p>
    <button onclick="myFunction()">Click to enlarge text</button>
    <script>
      function myFunction() {
        var element = document.body;
   		element.classList.toggle("toggled");
      }
    </script>

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...