The reason of this alignment technique on css : I've got a question over here: 

I'm new with css, and I've been searching online about horizontal and vertical alignment techniques and I found plenty of them. However, given that I finished my first css and html course  and the next step is responsive design I wanted to lear to work with % instead of exact units which led me to this technique: 

    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
 
I know that with absolute positioned elements the top, bottom, right and left properties set space between the element and the edge of its ancestor or father if there's one. In the technique they put the element 50% below and 50% to the left which is logical if the intention is to center horizontally and vertically the element, but why the transform property that is used to rotate, scale, move elements is used with negative values??. 

Hope you can explain this for me, thank you for your time.   

Here's my code:

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-css -->

    .container {
      height: 700px;
      display: block;
      width: 100%;
      height: 700px;
      text-align: center;
      overflow: hidden;
     }
     
     .container img{
      background-size: cover;
    }

    .container > h1 {
        font-size: 72px;
        position: absolute;
        color: white;
        width: 100%;
        top: 50%;
        left: 50%;
        transform: translateX(-50%) translateY(-50%);
      }



<!-- language: lang-html -->

    <div class="container">
      <h1>Enjoy This Magical Experience</h1>
      <img src="https://static.tumblr.com/737181aea20b4523b6fce168a29fe06b/nwsqmvx/cIhmrn4un/tumblr_static_bigstock_silhouettes_of_concert_crowd_i_1565261621.jpg"/>
    </div>

<!-- end snippet -->


