首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何在一行内容下浮动右图像

如何在一行内容下浮动右图像
EN

Stack Overflow用户
提问于 2018-09-02 12:04:00
回答 1查看 101关注 0票数 0

这是我的内容

如何将图片的内容浮动到1行以下

这是我的代码

代码语言:javascript
运行
复制
<div class="single-content">
   <div class="floating-image-right">
       <img src="https://dl2.macupdate.com/images/icons256/30017.png" />
   </div>
   <div class="entry_content">
<strong>CleanMyMac</strong> makes space for the things you love. Sporting a range of ingenious new features, CleanMyMac lets you safely and intelligently scan and clean your entire system, delete large, unused files, reduce the size of your iPhoto library, uninstall unneeded apps or fix the ones that started to work improperly, manage all your extensions from one place and do much more – all from one newly designed and beautifully simple interface.
   </div>
</div>

<style>
.floating-image-right {
    float: right;
    max-width: 128px;
}
</style>
EN

回答 1

Stack Overflow用户

发布于 2018-09-03 04:49:53

你必须非常具体地把你的floating-image-right标签放在哪里。

https://jsfiddle.net/fgpLs4u5/2/

代码语言:javascript
运行
复制
body {
  max-width:800px;
  margin: 0 auto;
}
span.img-demo {
  background: red;
  display: block;
  width: 300px;
  height: 150px;
  float: right;
  margin: 7px 0 10px 10px;
  padding: 0;
}
代码语言:javascript
运行
复制
<p class="content">
 This is some content here. This is some content here. This is some content here. This is some content here. <span class="img-demo"></span> This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. This is some content here. 
</p>

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52133877

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档