*{ margin: 0; padding: 0; } body{ background: #1B1C1D; font-family: 'Roboto Slab', serif; color: rgba(52, 44, 18, 0.6); background-size: cover; background-attachment: fixed; background-image: url('fondo.jpg'); height: 100vh; } #principal{ width: 50vw; margin: 0 auto; color: white; background: rgba( 0, 0 , 0, 0.8); padding: 2%; } h1 { font-size: 3vw; } p{ line-height: 160%; text-align: justify; font-size: 1.2vw; margin-top: 0.8em; } .cd-top { display: inline-block; height: 40px; width: 40px; position: fixed; bottom: 40px; right: 10px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.05); /* image replacement properties */ overflow: hidden; text-indent: 100%; white-space: nowrap; background: rgba(15, 3, 6, 0.8) url('cd-top-arrow.svg') no-repeat center 50%; visibility: hidden; opacity: 0; -webkit-transition: all 0.3s; -moz-transition: all 0.3s; transition: all 0.3s; } .cd-top.cd-is-visible { /* the button becomes visible */ visibility: visible; opacity: 1; } .cd-top.cd-fade-out { /* if the user keeps scrolling down, the button is out of focus and becomes less visible */ opacity: .5; } .no-touch .cd-top:hover { background-color: #0f0306; opacity: 1; } @media only screen and (min-width: 768px) { .cd-top { right: 20px; bottom: 20px; } } @media only screen and (min-width: 1024px) { .cd-top { height: 60px; width: 60px; right: 30px; bottom: 30px; } } /* Media query */ @media (max-width: 1024px) { h1{ font-size: 18px; } p { font-size: 12px; } }