我正在建立一个相当简单的响应式网站.我有一个徽标div,可以将徽标放在小屏幕上,左侧放在大屏幕上.一切都按照我想要的方式工作,(尝试调整jsfiddle的大小)除了我希望徽标div在链接换行到下一行之前缩小到它的最小宽度.我不知道怎么说这个,但我希望logo div根据链接是否正在推动它(如果它们有足够的空间)来调整大小.当它到达它的最小宽度时,链接应该换行.不确定这是否可行,但我想我还是会问.
html:
logo
link one
link two
link three
css:
.header {
text-align: center; /* Centers the logo text, and centers the links between the logo div and the other side of the page.*/
}
.logo {
max-width: 300px;
min-width: 100px;
width: 100%; /* It is always the min-width without this*/
background-color: red;
display: inline-block;
float: left;
}
.link {
display: inline-block;
background-color: green;
}
我希望我很清楚,我还在学习.如果我需要添加更多详细信息,请与我们联系.