我希望我的元素是一個正方形。我希望這個元素正方形的邊長爲屏幕/窗口高度的10%。然而,我不知道該怎麼做。這是我的代碼:如何在CSS中將元素的寬度設置爲等於高度的10%?
.Element {
width: /*How can I make the width equal to: [height: 10%]?*/;
height: 10%;
/*I wanted the element to be a square with a side length of [height: 10%].*/
}