How to change the style of the title attribute inside an anchor tag?

前端 未结 10 1432
故里飘歌
故里飘歌 2020-11-21 22:27

Example:

 Link 

How do I change the presentation of the \"title\" attribute in th

10条回答
  •  耶瑟儿~
    2020-11-21 23:04

    I have found the answer here: http://www.webdesignerdepot.com/2012/11/how-to-create-a-simple-css3-tooltip/

    my own code goes like this, I have changed the attribute name, if you maintain the title name for the attribute you end up having two popups for the same text, another change is that my text on hovering displays underneath the exposed text.

    .tags {
      display: inline;
      position: relative;
    }
    
    .tags:hover:after {
      background: #333;
      background: rgba(0, 0, 0, .8);
      border-radius: 5px;
      bottom: -34px;
      color: #fff;
      content: attr(gloss);
      left: 20%;
      padding: 5px 15px;
      position: absolute;
      z-index: 98;
      width: 350px;
    }
    
    .tags:hover:before {
      border: solid;
      border-color: #333 transparent;
      border-width: 0 6px 6px 6px;
      bottom: -4px;
      content: "";
      left: 50%;
      position: absolute;
      z-index: 99;
    }
    Exposed text

提交回复
热议问题