Edit in JSFiddle

$("#boton").click(function(){
    $(".content, .modal").show("slow");
});

$("#cerrar, .content").click(function(){
    $(".content, .modal").hide("slow");
});
.content{
    display: none;
    width:100%;
    height: 100%;
    position: absolute;
    background: #1D1F21;
    opacity: 0.6;
    top: 0;
    left: 0;
}

.modal{
    width: 600px;
    height: 400px;
    border: 1px dotted gray;
    border-radius: 10px;
    padding: 50px;
    box-sizing: border-box;
    background: white;
    position: absolute;
    display: none;
    margin: -200px 0 0 -300px;
    top: 50%;
    left: 50%;
}