レスポンシブに画像を含む div を配置しようとしています。
ブラウザのサイズが変更されても縦横比を維持する背景画像を使用しています。
%ages を使用して div を配置しましたが、ウィンドウが小さくなると、最終的に div が移動し、代わりに画像が切り取られ始めます。
これが私の例です:http://jsfiddle.net/bbLTD/1/
私の目標は、背景画像に対して同じ場所に小さな画像を置いたままダイビングすることです。
私はそれについて間違った方法で進んでいますか?
HTML/CSS は次のとおりです。
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>laPINA</title>
<style type="text/css">
html {
background: url(http://www.freegreatpicture.com/files/146/26189-abstract-color-background.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
</style>
</head>
<body>
<div style="position: absolute; bottom: 50%; right: 10%;">
<img src="http://www.friesens.com/wp-content/uploads/2011/10/Contact-UsHeader940x260.jpg" width="50" height="50" alt="contact_logo" />
</div>
</body>
</html>