ふわふわな吹き出し

概要

考えごとをしている場合をイメージする場合に使用する吹き出し


コード

<!DOCTYPE HTML>
<html lang="ja">
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style type="text/css">
            * {
                box-sizing: border-box;
                padding: 0px;
                margin: 0px;
            }
 
            .wrapper {
                padding: 30px;
                position: relative;
            } 
 
            .box {
                position: relative;
                background: #ccc;
                height: 100px;
                width: 150px;
                margin-bottom: 40px;
                border-radius: 50px;
            }
 
            .box:before {
                content: '';
                position: absolute;
                background: #ccc;
                height: 20px;
                width: 20px;
                border-radius: 10px;
                bottom: -15px;
                left: 125px;
            }
 
            .box:after {
                content: '';
                position: absolute;
                background: #ccc;
                height: 10px;
                width: 10px;
                border-radius: 5px;
                bottom: -30px;
                left: 145px;
            }
 
            .msg {
                padding: 20px;
                line-height: 1.5;
            }
            }
 
            .break {
                white-space: pre;           /* [[CSS]] 2.0 */
                white-space: pre-wrap;      /* CSS 2.1 */
                white-space: pre-line;      /* CSS 3.0 */
                white-space: -pre-wrap;     /* Opera 4-6 */
                white-space: -o-pre-wrap;   /* Opera 7 */
                white-space: -moz-pre-wrap; /* Mozilla */
                white-space: -hp-pre-wrap;  /* HP Printers */
                word-wrap: break-word;      /* IE 5+ */
            }
 
             .message{
                 border: 1px dashed #000000;
                padding: 10px 5px;
             }
 
        </style>
    </head>
    <body>
        <div class="wrapper">
            <div class="box break">
                <div class="msg">テストの吹き出し</div>
            </div>
            <div class="message">
                <p>吹き出し元のなんかの情報を設定する場所</p>
            </div>
        </div>
    </body>
</html>
 
 

結果



最終更新:2013年03月09日 20:23