<button id="follow" onclick="followed();">Follow</button>
<br>
<br>
<button id="followed" onclick="unfollow();">Followed</button>
#follow{
transition-duration:1s;
color:white;
font-family:arial;
font-weight:900;
background:#1DA1F2;
border:5px solid #1DA1F2;
padding:10px 10px 10px 10px;
border-radius:50000px;
font-size:20px;
outline:none;
}
#follow:hover{
background:white;
color:#1DA1F2;
}
#followed{
transition-duration:1s;
color:white;
font-family:arial;
font-weight:900;
background:maroon;
border:5px solid maroon;
padding:10px 10px 10px 10px;
border-radius:50000px;
font-size:20px;
outline:none;
position:fixed;
top:8px;
display:none;
}
#followed:hover{
background:white;
color:maroon;
}
function followed(){
document.getElementById('follow').style.display="none";document.getElementById('followed').style.display="block";
}
function unfollow(){
document.getElementById('followed').style.display="none"; document.getElementById('follow').style.display="block";
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.