我试图让文本在我的图片旁边正确排列。这是我尝试过的方法,但它会丢弃文本,使间距看起来非常不愉快。如有任何帮助,我们将不胜感激。
<p><img src="../../images/stop.jpg" style="width:40px;height:40px;">Your transaction requires special instructions from our office. Please complete this Special Handling form, and we will contact you within three business days to provide assistance. Please do not complete this mail packet until you receive our instructions. Thank you!</p>
最佳答案
我会用一点 CSS 将图像 float 到左侧,这样文本就可以 float 在它旁边:
img {
float: left;
}
<p>
<img src="../../images/stop.jpg" style="width:40px;height:40px;">Your transaction requires special instructions from our office. Please complete this Special Handling form, and we will contact you within three business days to provide assistance. Please do not complete this mail packet until you receive our instructions.
Thank you!</p>
关于html - 图片旁边的段落,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31975466/