How to make a fixed and retractable baseboard similar to the Earth Portal Economy page?

6

I have the idea of building a fixed footer on the page similar to the portal Terra de Economia. Such functionality will allow me to expose a chat in this space.

I like the Earth solution because it is possible to retract the object and still keep it in the lower right corner without disturbing the page reading.

I need to know the name of the property and technologies involved.

link

    
asked by anonymous 19.03.2014 / 13:51

2 answers

2

Create a footer with a id="rodape" and then put it in css: html:

 <footer id="rodape"><a style="position: relative; right: 0px; float:left; font-size: 50px; display: block; text-decoration: none; color: #ffffff; " href="javascript:drop('fechar')" id="link"><span> < </span></a>
</footer>

css:

  #rodape{
    margin-bottom:0px;
    bottom: 0px;
    background: #333333;
    width: 100%;
    height: 50px;
    position: absolute;
    right: 0px;
    -webkit-transition: 0.5s;
  }

width: 100% and height: 50px are optional. If you do not want a width: 100% aligns with left: .

hide / appear script

    function drop(ver){
    if(ver == "fechar"){
        document.getElementById('rodape').style.left = "-97%";
        document.getElementById('link').style.float = "right";
        document.getElementById('link').href = "javascript:drop('abrir')";
        document.getElementById('link').innerHTML = ">";
    }if(ver == "abrir"){
        document.getElementById('rodape').style.left = "0px";
        document.getElementById('link').style.float = "left";
        document.getElementById('link').href = "javascript:drop('fechar')";
        document.getElementById('link').innerHTML = "<";
    }
}

And to appear when the user is at the end this link can help you link

    
19.03.2014 / 14:17
2

You can use .animate() of JQuery to hide the footer display

Here's an example:

JSFiddle

    
19.03.2014 / 15:18