Você não está conectado. Conecte-se ou registre-se

Xícara de café flat em puro CSS

Ver o tópico anterior Ver o tópico seguinte Ir para baixo  Mensagem [Página 1 de 1]

1Xícara de café flat em puro CSS Empty Xícara de café flat em puro CSS Qua 18 Jun 2014 - 18:26

waghcwb

waghcwb
Novato
Olá,

Sou mais um viciado em café, e como sempre que estou codando estou aqui tomando (inclusive agora mesmo x.x).. Resolvi tentar fazer uma xícara de café com puro CSS, e consegui um resultado bacana, lembrando que é feita baseada no flat design, por isso é bem simples Very Happy

Resultado:
[Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]

Códigos usados:
Código:

<!DOCTYPE html>
<!--
// Cup of coffee with pure CSS
// Author: Wagner ( /waghcwb )
// This is just a simple example, this work is free and not commercial.
// Feel free to share or modify it, but just remember to maintain the credits (:
// Last update: 01/06/2014
-->
<html>
    <head>
        <title>Xícara de café flat em CSS puro</title>
        <meta charset="utf-8">
        <style type="text/css">
        *, *:before, *:after {
            -webkit-box-sizing: border-box;
              -moz-box-sizing: border-box;
                    box-sizing: border-box;
                    margin: 0;
                    padding: 0;
                    outline: none;
        }
        body{
            font: 10px Lucida sans;
            background: #98bfff;
            color: #fff;
        }
        #cafe{
            margin: 0 auto;
            width: 20em;
            height: 22em;
            margin-left: -10em;
            left: 50%;
            top: 10%;
            position: absolute;
        }
        #circulo{
            border-radius: 50%;
            width: 20em;
            height: 20em;
            background: #fff;
            position: absolute;
        }
        #liquido{
            background: #581b00;
            border-radius: 50%;
            width: 15em;
            height: 15em;
            position: absolute;
            left: 50%;
            top: 50%;
            margin-left: -7.5em;
            margin-top: -7.5em;
            box-shadow: inset rgba(0,0,0,.2) -2em 2em 0;
        }
        #cabo{
            background: #fff;
            width: 3em;
            height: 7em;
            border-radius: 30%;
            position: absolute;
            bottom: 0;
            right: 0;
            -webkit-transform: rotate(-45deg);
            transform: rotate(-45deg);
        }
        #wrap{
            max-width: 800px;
            margin: 30em auto 0;
        }
        </style>
    </head>
    <body>
        <section id="wrap">
            <section id="cafe">
                <div id="cabo"></div>
                <div id="circulo">
                    <div id="liquido"></div>
                </div>
            </section>
            <section id="tutorial">
                <h2>Xícara de café flat em CSS</h2>
            </section>
        </section>
    </body>
</html>

2Xícara de café flat em puro CSS Empty Re: Xícara de café flat em puro CSS Qua 18 Jun 2014 - 18:31

Helix

Helix
Legend
Shocked essa Xicra de café é mesmo feita em só em CSS?? Muito bom, fico até com inveja de não ter tanto conhecimento para fazer algo igual.
Reputado!

http://www.rewtec.com

Ver o tópico anterior Ver o tópico seguinte Ir para o topo  Mensagem [Página 1 de 1]

Permissões neste sub-fórum
Não podes responder a tópicos