2013-08-18 127 views
1

我需要旋轉圖像下的一些文字,並將其放在圖像的左側並將其垂直居中。即時通訊使用此與CMS,所以圖像的確切高度和寬度會有所不同。我還需要將圖像置於頁面上。將圖像下的文字旋轉到圖像左側並將其固定在圖像左側

這是我有: enter image description here

而這正是我嘗試實現: enter image description here

這裏是我的小提琴,但我havnt用它得到了很遠:http://jsfiddle.net/FgA8x/5/

這是html的粗略結構,但如果需要可以更改:

<div> 
    <img src="http://thumbs.dreamstime.com/z/young-footballer-1642893.jpg" width="150px" height="250px" /> 
    <p>This is some caption text</p> 
</div>  

<div> 
    <img src="http://thumbs.dreamstime.com/z/young-footballer-1642893.jpg" width="300px" height="250px" /> 
    <p>This is some caption text</p> 
</div>  

<div> 
    <img src="http://thumbs.dreamstime.com/z/young-footballer-1642893.jpg" width="500px" height="250px" /> 
    <p>This is some caption text</p> 
</div>  

回答

0

我似乎無法得到正確的間距,但這是一個大致的想法,即如何使用標題文本上的容器上的display: inline和標題文本上的float: left將左側的標題排列在左側。下面有一個小提琴:

Fiddle

希望這有助於。

+0

這似乎不值得沒有設置段落行高度。正如我正在使用CMS一樣,圖像的實際高度會有所不同。 – Evans