当前位置: 首页 > 知识库问答 >
问题:

如何设置文本换行的时间?

陈誉
2023-03-14

我有一个左侧浮动的图像,其右侧有文本(在

元素中),通过在段落元素上使用display:flow-root,图像周围没有文本环绕。 我想要的是,当图像下面溢出了一定数量的行(比如三行)时,可以开始将文本环绕在图像周围。 有什么办法可以做到这一点吗? 谢了。 我现有的代码(用于容器中的图像和文本):

null

.listing-img {
  float: left;
  margin-right: 20px;
  display: flow-root;
}

.listing-content {
  display: flow-root;
}
html lang-html prettyprint-override"><section class="listing">
  <img src="https://via.placeholder.com/500x300?text=About+the+Farr+Homestead" class="listing-img" />
  <p class="listing-content">
    A key feature of the apple orchard management structure in the Farr Orchard will be maintaining a healthy orchard understory. Apple trees grow naturally in hedgerows along the edge of forests, where the ground is usually covered with wildflowers and tall
    grass. This benefits beneficial insects and pollinators by providing habitat and keeps the soil fertile for the tree, which in turn supports better fruit size and cropping when applied to an orchard. Tree rows will usually be mowed about twice a year
    to maintain the same perennial wildflower domination - once shortly after blossom, around July; and again before harvest begins, in mid to late September. In addition to the mulching effect caused be cutting the grass at these key points, wood chip
    mulch and gravel will keep the root system of the trees healthy and free from excessive weed pressure, while not harming surrounding plants. This will promote genetic diversity in the orchard.
  </p>
</section>

null

这张图片显示了结果。

共有1个答案

常经赋
2023-03-14

为什么不在段落内移动图像,并通过边距控制图像与段落之间的距离呢?

null

.listing-img {
  float: left;
  margin-right: 20px;
  margin-bottom: 4rem;
}
html prettyprint-override"><section class="listing">
  
  <p class="listing-content">
  <img src="https://via.placeholder.com/500x300?text=About+the+Farr+Homestead" class="listing-img" />
    A key feature of the apple orchard management structure in the Farr Orchard will be maintaining a healthy orchard understory. Apple trees grow naturally in hedgerows along the edge of forests, where the ground is usually covered with wildflowers and tall
    grass. This benefits beneficial insects and pollinators by providing habitat and keeps the soil fertile for the tree, which in turn supports better fruit size and cropping when applied to an orchard. Tree rows will usually be mowed about twice a year
    to maintain the same perennial wildflower domination - once shortly after blossom, around July; and again before harvest begins, in mid to late September. In addition to the mulching effect caused be cutting the grass at these key points, wood chip
    mulch and gravel will keep the root system of the trees healthy and free from excessive weed pressure, while not harming surrounding plants. This will promote genetic diversity in the orchard.
    
        A key feature of the apple orchard management structure in the Farr Orchard will be maintaining a healthy orchard understory. Apple trees grow naturally in hedgerows along the edge of forests, where the ground is usually covered with wildflowers and tall
    grass. This benefits beneficial insects and pollinators by providing habitat and keeps the soil fertile for the tree, which in turn supports better fruit size and cropping when applied to an orchard. Tree rows will usually be mowed about twice a year
    to maintain the same perennial wildflower domination - once shortly after blossom, around July; and again before harvest begins, in mid to late September. In addition to the mulching effect caused be cutting the grass at these key points, wood chip
    mulch and gravel will keep the root system of the trees healthy and free from excessive weed pressure, while not harming surrounding plants. This will promote genetic diversity in the orchard.
    
        A key feature of the apple orchard management structure in the Farr Orchard will be maintaining a healthy orchard understory. Apple trees grow naturally in hedgerows along the edge of forests, where the ground is usually covered with wildflowers and tall
    grass. This benefits beneficial insects and pollinators by providing habitat and keeps the soil fertile for the tree, which in turn supports better fruit size and cropping when applied to an orchard. Tree rows will usually be mowed about twice a year
    to maintain the same perennial wildflower domination - once shortly after blossom, around July; and again before harvest begins, in mid to late September. In addition to the mulching effect caused be cutting the grass at these key points, wood chip
    mulch and gravel will keep the root system of the trees healthy and free from excessive weed pressure, while not harming surrounding plants. This will promote genetic diversity in the orchard.
    
        A key feature of the apple orchard management structure in the Farr Orchard will be maintaining a healthy orchard understory. Apple trees grow naturally in hedgerows along the edge of forests, where the ground is usually covered with wildflowers and tall
    grass. This benefits beneficial insects and pollinators by providing habitat and keeps the soil fertile for the tree, which in turn supports better fruit size and cropping when applied to an orchard. Tree rows will usually be mowed about twice a year
    to maintain the same perennial wildflower domination - once shortly after blossom, around July; and again before harvest begins, in mid to late September. In addition to the mulching effect caused be cutting the grass at these key points, wood chip
    mulch and gravel will keep the root system of the trees healthy and free from excessive weed pressure, while not harming surrounding plants. This will promote genetic diversity in the orchard.
  </p>
</section>
 类似资料:
  • 问题内容: 因为我们知道,我们可以设置在在 日食。但是,当我将该项目打包到一个可运行的jar文件中时,如何通过运行jar来设置? 非常感谢! 问题答案: 尝试文件名。 我找到了这个选项,Java选项-Xmx代表什么?并在例如启动Netbeans时使用它。 这样使用 info: 指定内存分配池的最大大小(以字节为单位)。此值必须是大于2MB的1024的倍数。追加字母k或K表示千字节,或者追加m或M表

  • dnsmasq如何配置本地的缓存时间过期后重新向指定的DNS(server=)服务器发起请求,以获取该域名的IP地址?我使用两台dnsmasq,一台为dns解析服务,提供域名解析ip,另外一台在/etc/dnsmasq.d/address.config中配置server=该机器ip(那台机器提供DNS服务)。我在提供服务的机器上将A记录改了,dig出来的还是之前的A记录。如何在dnsmasq中配置

  • 我正在尝试设置组合框的文本颜色。 我尝试的代码

  • 如何设置组件的焦点? 我已经尝试了上述代码,但不起作用:(

  • 运行时运行case 0时,我一直收到java.lang.NullPointerException。该问题似乎与设置TextField的提示文本有关。但是,当我切换选项卡时,问题不会返回。GUI是在Scene Builder中构建的。如何将TextField初始化为非空值。 这是准确的错误代码 我的FXML文件 FXML文件确实附加了正确的控制器

  • 请任何人帮助我在运行时设置java版本路径。 我在不同的目录中安装了两个java版本。但我需要使用Java7编译代码来使用java6版本执行应用程序。 我需要为firefox浏览器设置Java6路径,有人能帮我吗 提前谢谢

  • 问题内容: 我需要禁用IPv6。为此,Java文档指示设置jvm属性。 但是我不了解如何从代码本身做到这一点。 许多论坛都演示了如何从命令提示符下执行此操作,但是我需要在运行时执行此操作。 问题答案: 您可以使用 这等效于通过以下命令在命令行中传递它

  • 如果单元格内文本包含 \n ,将处理换行样式。 $format = new \Vtiful\Kernel\Format($fileHandle); $wrapStyle = $format->wrap()->toResource();