两列 css3 文本,中间有图像

问题描述 投票:0回答:1

我想达到这个结果

enter image description here

有很多教程像这样,但它们使用固定的文本和列。我以这种方式在两列布局中打印可变长度文本

#cols {
column-count: 2;
column-gap: 20px;
}
<div id="box">
  <p id="cols">
    Lorem Ipsum....
  </p>
</div>

所以我不能使用这样的技术,在这种情况下如何将图像放在中间?

html css
1个回答
4
投票

你在这里:
http://jsfiddle.net/aX47K/

CSS:

.column{  
   width:300px;  
   float:left;  
   margin-right:20px;  
} 

.column div{  
  width:200px;  
  height:210px;  
}

#col-1 div{
  float:right;
}
#col-2 div{
 float:left;
} 

img#center-image{  
  position:absolute;  
  left:110px;
}
© www.soinside.com 2019 - 2024. All rights reserved.