8

例如:

text text text text text text text text text text text text 
text text text text text text text text text text text text 
text text text text ------------------- text text text text 
text text text text |this is the image| text text text text
text text text text ------------------- text text text text 
text text text text text text text text text text text text 
text text text text text text text text text text text text 

这可能吗?

4

2 回答 2

3

这是一篇使用伪元素的好文章。

http://css-tricks.com/float-center/

于 2012-12-28T17:00:15.803 回答
0

有可能的 ...

<p style="font: 12px Arial, sans-serif; width: 300px;">

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sit amet nunc a neque vehicula mollis. Sed ac augue a purus

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 

    congue aliquet vitae id libero. Aenean porttitor &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ultricies neque. Cras lorem nulla, rhoncus &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id est at, luctus mattis magna. Sed imperdiet &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
    vel risus id luctus. Donec efficitur ar &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pharetra. Donec tincidunt ligula magna, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; et gravida orci lacinia quis. In semper congue nisl, a &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pretium augue euismod et. Suspendisse felis nibh, feugiat vel mollis eu, dapibus tempus arcu. Etiam porttitor tortor nec gravida semper. Morbi metus lorem, volutpat ac varius

    <img  style="position:absolute; top:50px; left:90px; width:100px;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAaCAYAAACgoey0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5QMLAAIDscPueAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAF0SURBVEjHxdY7SxxRFADgT9EkiEUKIU98kMJKrVMHjJCAIFiINqZYBBu7NOlEbPwFNv4DCanEEDCFCoJWEUS2sAiCJogoKQxZ1+YOLMNOnFlnxwOnuWfmfty5j7nUj26cYFiB8RA7qAb8eVHwckCj3EBbs9GpGBrlfDPRQfxJgCt42wz0McoJaJSneJEn2oLVW9Aov+c5359SolEu5AX/ywhXMJIHvJoRruIXXv6nz8m0+HjoLAu+jfY6fb0OX+VNWvxJA6NfrHPq7YfaTli4soz+d0r4GqM17y7G6u+yzvtTfE6Jn6EXQ/gbq+1mHXUU0zhPgW9iL6E21uiqf4YvDaz8KH+g9S7bbjx81kbwibvu+R58vQUphymq1LQd5nHUtqCEiwT4fXhuNtY+nddR24tvsc7XY88s1dSO8CDPP1sJl7hCf536Sg0+k/f//BU+JNTasRbgn3hU5AWyA1sBn1NwdOEg3GQ6i8b7cIyP7iEGUL4BlT/pqRe12YMAAAAASUVORK5CYII=">
    
</p>

  1. p制作具有固定字体大小和固定宽度的段落。
  2. 使图像img定位为绝对。
  3. &nbsp;在图像覆盖的地方放置不间断的空格。
于 2021-03-11T00:46:30.240 回答