image - CSS 在两列上显示图像(列数分隔)

标签 image css

我有一个分成两列的 div,使用:

column-count: 2;
column-gap: 20px;

在里面我现在有一张图片:http://img823.imageshack.us/img823/6710/herpt.png 我希望这张图片出现在两列上,所以我尝试了

    column-span:all

http://img339.imageshack.us/img339/8664/derpv.png , 但这会破坏文本流,它现在有两个带有列的 block ,一个在图像上方,一个在图像下方,但我想保持通常的流程并将单个列分开。

最佳答案

这就是column-span,因为它是defined , 应该做的:

Example XX

In this example, an h2 element has been added to the sample document after the first sentence in the fourth sentence (i.e., after the word "jkl."). This styling applies:

h2 { column-span: all; background: silver }  
img { display: none }

By setting ‘column-span’ to ‘all’, all content that appear before the h2 element is shown before the h2 element.

为此你需要的是 CSS3 ExclusionsCSS3 Positioned floats .不幸的是,还没有发布的浏览器支持这两种规范(并且很可能在浏览器开始添加支持之前合并这两个规范)。

Adobe 有一个 prototype WebKit based implementation of Regions and Exclusions你可以尝试一下。如果你有 IE10 Developer Preview 2,there's a demo of positioned floats available here .

关于image - CSS 在两列上显示图像(列数分隔),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6558904/

相关文章:

css - javafx按钮悬停时隐藏文本的一部分

java - 使用 Java 的 ConvolveOP 的 Sobel 滤波器对图像进行边缘检测的问题

css - 如何根据内容是否在小屏幕上查看,在我的 Rails 应用程序中显示文本与图像?

javascript - 用图像标记活跃用户

html - 为宽度低于 768 像素的设备引入 <br>

html - 让 Safari 识别 <main> HTML 5

c++ - 可以输出文件吗? (注意, "to"不是一个文件)

java - 检测扫描文档中裁剪标记的位置

iphone - 在 iPhone HTML 邮件中显示本地镜像

javascript - jQuery mouseenter 函数 - 如果颜色还没有改变颜色