Html 在文章左上角插入图片

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7970048/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 11:20:12  来源:igfitidea点击:

insert image in the article top left corner

htmlcss

提问by bharanikumar Bs

find the image attachment,

找到图片附件,

image will showing the my article markup,

图像将显示我的文章标记,

how to build the html wire frame, same like image attachment,

如何构建 html 线框,和图片附件一样,

want to show image in the top left corner and article should start in the mid of the image,

想要在左上角显示图像,文章应该从图像的中间开始,

and length of the article should continue and show the below of the article, same like what i

和文章的长度应该继续并显示文章的下面,就像我一样

attached, which way is the best and suitable for my requirement, DIV/Table,

附上,哪种方式最适合我的要求,DIV/Table,

i guess with table not able to complete, DIV is the suitable one, but really i dont have where to start this,

我想表格无法完成,DIV 是合适的,但我真的没有从哪里开始,

is there any sample markup, please refer that link, enter image description here

是否有任何示例标记,请参阅该链接, 在此处输入图片说明

回答by Devin Burke

Just add style="float: left;"or align="left"to your image. So your markup should look like this:

只需添加style="float: left;"align="left"到您的图像。所以你的标记应该是这样的:

<img src="..." style="float: left;" />
<p>josh</p>
<p>It is a long es......</p>

Using style="float: left;"is considered better practice now because it uses CSS rather than DOM attributes. Make sure your image is above your text.

使用style="float: left;"现在被认为是更好的做法,因为它使用 CSS 而不是 DOM 属性。确保您的图片位于文字上方。

回答by sasidhar

You need to understand some basic html and css first. Its not a very good practice to rely on tables for everything. Tables must be used only when they really make sense. And it advised to use divs in other scenarios. Take a look at this, this might be the kind of output you are expecting.

你需要先了解一些基本的html和css。一切都依赖于表格并不是一个很好的做法。只有在真正有意义时才必须使用表格。它建议在其他场景中使用 div。看看这个,这可能是你期望的那种输出。