-1

嘿,我正在尝试在其旁边嵌入 4 张带有 1 个文本和 2 个链接的图片,但我无法通过最后三个...这是到目前为止的代码:

 <img src="http://developers-community.com/beta/photoshopcc.png"  align="left">
 <font size="3" style="padding: 10px;color:#008B8B;">Photoshop</font>
 <br>
 <a class="link" href="#"  style="padding:10px">Preview</a>
 <br>
 <a class="link" href="#" style="padding:10px;">Add to your page</a>

我尝试了几个 CSS 东西,比如 holder 和 pic1、pic2、pic3、pic 4,但它似乎只适用于没有文本和链接的图像。我需要获得 3 张与这张图片相同大小的其他图片以及相同的链接和文本。我需要图像是水平的,文本是垂直的。

4

2 回答 2

0

像这样

[演示] 1

css

.pull-left{
    float:left;
}
于 2013-09-06T11:19:20.967 回答
0

工作小提琴

<div style=width:100%;float:left;">

<div  style="verticalalign:top;float:left;">
     <img src="http://developers-community.com/beta/photoshopcc.png"  align="left">
     <font size="3" style="padding: 10px;color:#008B8B;">Photoshop</font>
 <br>
     <a class="link" href="#"  style="padding:10px">Preview</a>
 <br>
     <a class="link" href="#" style="padding:10px;">Add to your page</a></div>
<div  style="verticalalign:top;float:left;">
     <img src="http://developers-community.com/beta/photoshopcc.png"  align="left">
     <font size="3" style="padding: 10px;color:#008B8B;">Photoshop</font>
 <br>
     <a class="link" href="#"  style="padding:10px">Preview</a>
 <br>
     <a class="link" href="#" style="padding:10px;">Add to your page</a></div>
<div  style="verticalalign:top;float:left;">
     <img src="http://developers-community.com/beta/photoshopcc.png"  align="left">
     <font size="3" style="padding: 10px;color:#008B8B;">Photoshop</font>
 <br>
     <a class="link" href="#"  style="padding:10px">Preview</a>
 <br>
     <a class="link" href="#" style="padding:10px;">Add to your page</a></div>
<div  style="verticalalign:top;float:left;">
     <img src="http://developers-community.com/beta/photoshopcc.png"  align="left">
     <font size="3" style="padding: 10px;color:#008B8B;">Photoshop</font>
 <br>
     <a class="link" href="#"  style="padding:10px">Preview</a>
 <br>
     <a class="link" href="#" style="padding:10px;">Add to your page</a></div>

</div>
于 2013-09-06T11:22:50.583 回答