当我调整浏览器窗口的大小时,图像会缩小(应该如此),但会在其 div 内向上和向左缩小。是什么决定了它收缩的方向,我可以选择吗?
示例在这里:http ://cdpn.io/FdIKv (缩小页面查看)
如何使文本缩小而不是重叠/被重叠的奖励。
谢谢!
编辑:抱歉,这里是代码:
<style type="text/css">
#logo-div {
max-width: 24%;
width: 24%;
height: auto;
clear: both;
z-index: 0;
float: right;
overflow: hidden;
}
#site-logo {
max-width: 100%;
display : block;
margin : 0 auto;
}
#site-title a {
color: #CB2027;
font-size: 2.7em;
margin-right: auto;
position: relative;
overflow: hidden;
}
#site-title {
margin-right: auto;
width: 80%;
position: relative;
overflow: hidden;
}
#site-description {
color: #000000;
font-size: 2.340em;
position: relative;
overflow: hidden;
width: 76%;
}
#branding hgroup {
max-width: 60%;
float: left;
width: 60%;
}
</style>
<header id="branding" role="banner">
<!--<div id="logo-and-hgroup">-->
<div id="logo-div"><img id="site-logo" src="http://farm6.staticflickr.com/5016/5421726832_eb5c0e25fc_m.jpg" alt="" /> </div>
<hgroup>
<h1 id="site-title">
<a href="http://google.com/" title="Thisisone ATest" rel="home">Thisisone ATest</a>
</h1>
<h2 id="site-description">This is where the description will go</h2>
</hgroup>