0
在这种情况下,我有一个这样的CSS:CSS高度等于由相关宽度
.w{
width:80%;
display:block;
}
.d{
width:14%;
display:inline-block
}
,这是我的html
<div class="w">
<a href="#" class="d">1</a>
<a href="#" class="d">2</a>
<a href="#" class="d">3</a>
<a href="#" class="d">4</a>
<a href="#" class="d">5</a>
</div>
所以现在的问题是,这有可能使.d
高度等于它的宽度? 我的意思是像这样的东西:height: 14% OF WIDTH
。 我读过css的所有单位here,但我找不到任何有用的东西
http://stackoverflow.com/questions/2648733/make-a-div-square-when-there-is-a-dynamically-changing-width基础的上,percenta – pol