2012-10-06 4 views
0

이미지를 텍스트와 연결하려고하므로 창 크기를 조정하면 텍스트가 이미지와 함께 이동합니다. 다음은 google.de의 예입니다. 창 크기를 조정할 때 Google 로고 아래의 텍스트가 이미지와 함께 이동하는 것을 볼 수 있습니다.html로 이미지와 텍스트를 연결하는 방법은 무엇입니까?

여기 내가 시도한 것.

HTML

<div class="logo"><img src="here is my logo" width="350"></div> 
<div class="textlogo">Here is the text</div> 

CSS는

.logo 
{ 
    text-align:center; 
} 
.logo img 
{ 
    position:relative; 
} 
.textlogo 
{ 
    position:absolute; 
    top:25%; 
    left:64%; 
} 
+1

당신이 구글에서 소스를 볼나요? 어떻게하는지 이해 했니? _that_을 (를) 복제하려고 시도 했습니까? – Oded

+0

예 그것을 보았지만 이해가되지 않습니다. – a1204773

답변

1

이는 구글이 실제로

<div title="Google" align="left" id="hplogo" style="background:url(images/srpr/logo3w.png) no-repeat;background-size:275px 95px;height:95px;width:275px"> 
<div nowrap="nowrap" style="font-size:16px;position:relative;left:214px;top:70px">Deutschland</div> 
</div> 

당신은 같은 방법이 도움이 될 것입니다

관련 문제