Home > OS >  how to show font on hovering the mouse over image
how to show font on hovering the mouse over image

Time:09-11

i want to show the span tag content only when someone hover the mouse over it I have no idea to do it I trie onm ouseover in the same span tag but I did not work any idea or suggestion will be helpful

<input type="checkbox" name="python" id="py"> <img src="https://www.svgrepo.com/show/331553/python-package-index.svg" alt="" id="py" width='50px'><span id="py">Python</span>

what I want to do is when some person is hovering over or over the check box input than span content appear and tell user the name of image in right hand side that's why I connected I give all of them same id it can be wrong

CodePudding user response:

  #py-text {
        display: none;

    }

    .wrapper:hover #py-text {
        display: inline;
    }
 <div >
            <input type="checkbox" name="python" id="py-checkbox">
            <img src="https://www.svgrepo.com/show/331553/python-package-index.svg" alt="" id="py-img"                 width='50px'>
            <span id="py-text">Python</span>
 </div>

  • Related