本文介绍了如何在文本的左侧显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! if (mysql_num_rows($ cld1v)== ' 1'){ echo < img src = images / cld1 border ='1'style ='max-width:400px; position:relative; top:15px; float:right; margin-bottom:15px ; margin-left:15px;'>< br />; } while($ in = mysql_fetch_row($ text)){ echo < div style ='removed:relative;'> $ in [0]; } 如果(mysql_num_rows($ cld2v)== ' 1'){ echo < img src = images / cld2 border ='1'style ='position:relative; bottom:400px; float:left; left:0px; max-width:400px; margin-top :15px; margin-right:15px;'>; } 现在在这段代码中,第一张图片就像我想要的那样显示在右边。 这是怎么回事看起来像现在: http:// imageshack.us/photo/my-images/809/wp0m.png/ 这就是我想要的样子: http://imageshack.us/photo/my-images/843/o4to.png/ 第二个链接是旧页面的图片,文本以.html文档写入。第一个来自新页面,文本在mysql数据库中,更容易编辑 我需要这样的 文本文本文本文本----------- 文本文本文本文本|图片1 | 文本文本文本文本----------- 文本文本文本文本文本 文本文本文字文字文字 ---------文字文字文字 图片2 |文字文字文字 - -------文本文本文本texthttp://www.codeproject.com/Questions/ask.aspx 解决方案 cld1v)== ' 1'){ echo < img src = images / cld1 border ='1'style ='max-width:400px; position:relative; top :15px; float:right; margin-bottom:15px; margin-left:15px;'>< br />; } while( in = mysql_fetch_row( text)){ echo < div style ='removed:relative;'> if (mysql_num_rows($cld1v)=='1'){echo "<img src=images/cld1 border='1' style='max-width:400px; position:relative; top:15px; float:right; margin-bottom:15px; margin-left:15px;'><br />";}while($in=mysql_fetch_row($text)){echo "<div style='removed:relative;'>$in[0]";}if (mysql_num_rows($cld2v)=='1'){echo "<img src=images/cld2 border='1' style='position:relative; bottom:400px; float:left; left:0px; max-width:400px; margin-top:15px; margin-right:15px;'>";}Now in this code, the first image ist displayed on the right like I wanted it to.Thats how it looks like at the moment:http://imageshack.us/photo/my-images/809/wp0m.png/And that is how I want it too look like:http://imageshack.us/photo/my-images/843/o4to.png/The second link is a picture from the old page, where the text is written in a .html document. The first one is from the newpage, where the text is in a mysql database and its easier to editI need it like thistext text text text -----------text text text text | picture 1|text text text text -----------text text text text text texttext text text text text text--------- text text text textpicture 2|text text text text--------- text text text texthttp://www.codeproject.com/Questions/ask.aspx 解决方案 cld1v)=='1'){echo "<img src=images/cld1 border='1' style='max-width:400px; position:relative; top:15px; float:right; margin-bottom:15px; margin-left:15px;'><br />";}while(in=mysql_fetch_row(text)){echo "<div style='removed:relative;'> 这篇关于如何在文本的左侧显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-02 17:16