1

我正在做一个评论页面,但现在我遇到了气泡语音的对齐不对齐的问题。

例子

在此处输入图像描述

我想这可以用 CSS 修复,但不太确定。我在这里有我的演示http://jsfiddle.net/bSaJc/

提前致谢

这是我的CSS

.bubble-panel {
    display: inline-block;
    //border: 1px dotted #CCCCCC;
    height: 250px;
    position: relative;
    margin: 20px;
}


.bubble 
{
position: relative;
width: 535px;
height: 130px;
padding: 4px;
background: #FFFFFF;
-webkit-border-radius: 31px;
-moz-border-radius: 31px;
border-radius: 31px;
border: #46A5E4 solid 9px;
display:inline-block;
margin-bottom: 0px;
margin-right: 50px;

}

.bubble p
{
    margin: 10px;
}

.bubble:after 
{
content: '';
position: absolute;
border-style: solid;
border-width: 31px 14px 0;
border-color: #FFFFFF transparent;
display: block;
width: 0;
z-index: 1;
margin-left: -14px;
bottom: -31px;
left: 20%;
}

.bubble:before 
{
content: '';
position: absolute;
border-style: solid;
border-width: 39px 22px 0;
border-color: #46A5E4 transparent;
display: block;
width: 0;
z-index: 0;
margin-left: -22px;
bottom: -48px;
left: 20%;
}
.caption {
    //border: 1px solid red;
    width: 20em;
    font-size: 14px;
    line-height: 1.5;
    position: absolute;
    bottom: 15px;
    right: 50px;
}
.caption h1, .caption h2, .caption h3 {
    font-size: 1.00em;
    text-align: left;
    margin: 0;

}
4

3 回答 3

1

这是你想要的吗?

http://jsfiddle.net/cfknoop/bSaJc/1/

vertical-align:top;
于 2013-10-01T15:00:36.490 回答
1

看这个演示

我添加了vertical-align: middle;

.bubble {
   position: relative;
   width: 535px;
   height: 130px;
   padding: 4px;
   background: #FFFFFF;
   -webkit-border-radius: 31px;
   -moz-border-radius: 31px;
   border-radius: 31px;
   border: #46A5E4 solid 9px;
   display:inline-block;
   margin-bottom: 0px;
   margin-right: 50px;
   vertical-align: middle; /* ADD THIS LINE */

}
于 2013-10-01T15:03:10.760 回答
0

添加float:left.bubble-panel

.bubble-panel {
display: inline-block;
float: left;
height: 250px;
position: relative;
margin: 20px;
}

演示

于 2013-10-01T15:03:12.923 回答