styling an image title attribute using css?

前端 未结 7 1355
猫巷女王i
猫巷女王i 2020-12-14 13:07

I want to style the text we see when we hover over the image. I tried the following but it won’t work:


         


        
7条回答
  •  遥遥无期
    2020-12-14 13:33

    You can do that by this way-

    a.tip {
        border-bottom: 1px dashed;
        text-decoration: none
    }
    a.tip:hover {
        cursor: help;
        position: relative
    }
    a.tip span {
        display: none
    }
    a.tip:hover span {
        border: #c0c0c0 1px dotted;
        padding: 5px 20px 5px 5px;
        display: block;
        z-index: 100;
        left: 0px;
        margin: 10px;
        width: 250px;
        position: relative;
        top: -150px;
        text-decoration: none
    }
    
       
       This is the CSS tooltip showing up when you mouse over the link
    

提交回复
热议问题