JSFiddle - React, Tailwind, and code Playground
by alecarbo
HTML
<ul>
<li>
<button class="button">pulsante 1</button>
<div class="bubble-wrapper">
<div class="bubble">
<div class="content"> Lorem ipsum dolor sit amet, consectetur adipisicing elit... </div>
</div>
</div>
</li>
<li>
<button class="button">pulsante 2</button>
<div class="bubble-wrapper">
<div class="bubble">
<div class="content"> Lorem ipsum dolor sit amet, consectetur adipisicing elit... </div>
</div>
</div>
</li>
<li>
<button class="button">pulsante 3</button>
<div class="bubble-wrapper">
<div class="bubble">
<div class="content"> Lorem ipsum dolor sit amet, consectetur adipisicing elit... </div>
</div>
</div>
</li>
<li>
<button class="button">pulsante 4</button>
<div class="bubble-wrapper">
<div class="bubble">
<div class="content"> Lorem ipsum dolor sit amet, consectetur adipisicing elit... </div>
</div>
</div>
</li>
</ul>
CSS
body{
background: #0f3;
background: -webkit-linear-gradient(45deg, #0f3, #09f);
background: -moz-linear-gradient(45deg, #0f3, #09f);
background: linear-gradient(45deg, #0f3, #09f);
min-height:100%;
width:100%;
}
ul{ margin:20px 0 0 20px; }
li{
position:relative;
float:left;
margin-right:30px;
}
.button{
border:none;
background-color:#09d;
height:30px;
line-height:30px;
color:white;
font-size:18px;
width:120px;
}
.bubble-wrapper{
width:0;
height:0;
overflow:hidden;
opacity:0;
position:absolute;
top:40px;
left:0;
padding-top:10px;
-webkit-transition:width .7s, opacity .7s, height 1.5s;
-moz-transition:width .7s, opacity .7s, height 1.5s;
-o-transition:width .7s, opacity .7s, height 1.5s;
transition:width .7s, opacity .7s, height 1.5s;
}
.bubble{
border:3px solid #fff;
box-shadow:0px 0px 10px rgba(0,0,0,.5);
width:150px;
height:85px;
border-radius:0 0 10px 0;
}
.bubble > .content{
background-color:rgba(0,0,0,.5);
height:65px;
width:130px;
box-shadow:inset 0px 0px 10px rgba(200,255,200,0.3);
padding:10px;
font-size:16px;
font-family:Georgia,serif;
text-shadow:1px 1px 1px rgba(255,255,255,.3);
line-height:16px;
border-radius:0 0 10px 0;
}
.bubble > .content:after {
width:10px;
height:10px;
display:block;
background-image: -webkit-linear-gradient(left bottom, #ffffff 0, #ffffff 50%, rgba(0,0,0,0) 51%, rgba(0,0,0,0) 100%);
background-image: -moz-linear-gradient(left bottom, #ffffff 0, #ffffff 50%, rgba(0,0,0,0) 51%, rgba(0,0,0,0) 100%);
background-image: -o-linear-gradient(left bottom, #ffffff 0, #ffffff 50%, rgba(0,0,0,0) 51%, rgba(0,0,0,0) 100%);
background-image: linear-gradient(left bottom, #ffffff 0, #ffffff 50%, rgba(0,0,0,0) 51%, rgba(0,0,0,0) 100%);
content:'.';
text-indent:999px;
overflow:hidden;
position:absolute;
top:0px;
left:15px;
...