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ベースのパーセンタ – pol