Theja
Theja

Reputation: 762

Adding a tip to button when button active in HTML

enter image description here

enter image description here

How add tip to second image when it is active. I have tried this example to display tip but i not helped my requirement.

Thanks.

Upvotes: 0

Views: 81

Answers (2)

lax
lax

Reputation: 76

try this

<div id="pointed"> <a href="#">Arrow </a></div>

#pointed {
position: relative;
margin: 0 auto;
width: 200px;
height: 200px;
background-color: black;color:white
          }

#pointed:active::after {
position: absolute;
top: 100%;
left: 45%;
content: '';
width: 0;
height: 0;
border-top: solid 10px black;
border-left: solid 10px transparent;
border-right: solid 10px transparent;
}

Upvotes: 0

Sowmya
Sowmya

Reputation: 26969

Try this

HTML

<div id="pointed"> Arrow </div>

CSS

#pointed {
    position: relative;
    margin: 0 auto;
    width: 200px;
    height: 200px;
    background-color: black;color:white
}

#pointed::after {
    position: absolute;
    top: 100%;
    left: 30%;
    content: '';
    width: 0;
    height: 0;
    border-top: solid 10px black;
    border-left: solid 10px transparent;
    border-right: solid 10px transparent;
}

DEMO

Upvotes: 1

Related Questions