*, body {
    margin: 0;
    padding: 0;
}
body {
    height: 200vh;
}
.fixed {
    color: black;
    background-color: lightgreen;
    position: fixed;
    width: 100%;
}
.absolute {
    color: white;
    background-color: black;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.relative {
    width: 200px;
    color: white;
    background-color: red;
    border: 5px solid black;
    position: relative;
    top: 100px;
    left: 50%;
}
.sticky {
    color: black;
    background-color: linen;
    border: 5px solid red;
    position: sticky;
    top: 50px;
}