html - 将图像放置在 div 旁边(聊天气泡)

标签 html image css

我在“聊天气泡”旁边有一个用户的图像,但该图像显示在气泡之后。

我如何将图像放在聊天气泡之前并固定在 div 上?

我的代码在这里:http://www.codepen.io/anon/pen/fFxtl

谢谢。

最佳答案

这就是你想要的吗

http://www.codepen.io/anon/pen/afyuj

.bubble2{
 float:left 

}

.bubble
{
text-align:left;
color:black;
float:left;
position: relative;
background: gray;
border-left: 2px solid #e67e22;
margin-bottom:3%;
margin-left:0;
padding:5px;
}

.bubble h4 {text-align:left;font-size:14px;font-weight:bold;font-variant:small-caps;clear:both;margin-bottom:3px;padding:0;margin-top:-5px;color:#2ecc71;}
.bubble span {font-size:17px;line-height:1px;font-family: TimesNewRoman, "Times New Roman", Times, Baskerville, Georgia, serif;}

关于html - 将图像放置在 div 旁边(聊天气泡),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20391122/

相关文章:

html - 容器类右侧的额外空白

python - 如何在Python中随机化图像像素

c++ - 有 libPNG 64 位吗?

javascript - 通过参数将跨度内容发送到站点

具有奇偶类的 Javascript DOM 操作

jQuery 切换无法正常工作

jquery - jQuery中的CSS垂直居中

html - CSS 图像悬停会插入页面中的其他元素吗?

html - 由于验证消息,Div 在验证失败时向左移动

jquery - 根据页面不同地设计 WordPress Contact Form 7