Skip to content

Instantly share code, notes, and snippets.

@naturallucky
Created May 11, 2016 02:09
Show Gist options
  • Save naturallucky/e19631e32521f4d6e44d362f15a59777 to your computer and use it in GitHub Desktop.
Save naturallucky/e19631e32521f4d6e44d362f15a59777 to your computer and use it in GitHub Desktop.
following scroll button css(essence)
.followcard {
position: fixed;
top: -2000px;
z-index: 999;
margin-left:16px;
padding:10px;
background:#7777ff;
border-radius: 8px;
visibility: visible;
}
input#start:checked + .followcard{
background:#77f;
top: -webkit-calc(90vh - 20px);
top: -moz-calc(90vh - 20px);
top: calc(90vh - 20px);
left:90vw;
cursor:pointer;
}
.flow input{
display:none;
}
<div class="flow">
<input type="radio" name="status" id="start" checked="checked">
<div class="followcard">
<label for="close">X close</label>
</div>
<input type="radio" name="status" id="close">
</div>