velocity 在图片上添加文字

<div  id="opimg">
                    <ul >
                    #foreach($obj in $dp)
                    <li>
                    <a  href="${rc.contextPath}/gmym/gmym/list.jhtml?id=$obj.id">
                    <div style="position:relative;width:140px;height:180px;">
                        <img width="140" height="180" src="${rc.contextPath}/../tradeImage$obj.reserver1" alt="" />
                        <div style="position:absolute;width:130px;height:60px;z-indent:2;left:10;top:120;">
                          <font size="3" color="#2E2E2E"> $obj.productName</font>
                        </div>
                    </div>
                    </a>
                    </li>
                    #end
                    </ul>

                </div>


#opimg{float:left;margin-left:2px;margin-top:1px;position:absolute;left:0; top:0;word-break:break-all;width:750px;}

猜你喜欢

转载自blog.csdn.net/xianrenyingzi/article/details/32129885