Html 右对齐图像,并留出图像空间
我想要一个像这样的输出 以下是我尝试做的Html 右对齐图像,并留出图像空间,html,css,image,Html,Css,Image,我想要一个像这样的输出 以下是我尝试做的 注:我不能编辑内容的结构。因为你不能编辑HTML,你不能正确使用浮动,这将是一个完美的解决方案 但是,您可以使用绝对定位: div { width: 500px; min-height: 100px; /* image height */ position: relative; text-align: justify; } img { width:100px; position: absolute;
注:我不能编辑内容的结构。因为你不能编辑HTML,你不能正确使用浮动,这将是一个完美的解决方案 但是,您可以使用绝对定位:
div {
width: 500px;
min-height: 100px; /* image height */
position: relative;
text-align: justify;
}
img {
width:100px;
position: absolute;
top: 0;
right: 0;
}
p:first-child {
max-width: 400px; /* wrapper width - image width */
}
图像是否在div中?还是在它之外?在分区内。。我想我忘了关潜水舱了。请看看这个?他不能编辑htmlyou将不得不使用绝对定位,我相信