gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-28 14:37:32 26 4
gpt4 key购买 nike

我有一个分成两列的 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com