<分区>
所以我想在我的矩形上得到一个 90 度 Angular 的 Angular (宽度 96.6%,高度 6.5%)
矩形上的应用设置:Border-radius-bottom-left: 5%; border-radius-bottom-right: 5%;), 这给了它一个 eclipse 形状,但它需要是一个 90 度 Angular 。
我需要使用哪些设置才能获得此信息?
标签 html eclipse css rectangles
<分区>
所以我想在我的矩形上得到一个 90 度 Angular 的 Angular (宽度 96.6%,高度 6.5%)
矩形上的应用设置:Border-radius-bottom-left: 5%; border-radius-bottom-right: 5%;), 这给了它一个 eclipse 形状,但它需要是一个 90 度 Angular 。
我需要使用哪些设置才能获得此信息?
最佳答案
您需要为您的 border-radius
使用绝对指标例如px
、em
或 in
而不是 %
以确保 x
和y
值是合格的。否则它们将取决于 width
和 height
的值,只要您的元素不是正方形,您就会得到一个省略号。
html,
body {
height: 100%;
width: 100%;
padding: 0;
margin: 0;
}
.rectangle {
width: 96.6%;
height: 6.5%;
background: green;
border-radius: 10px;
}
<div class="rectangle"></div>
阅读this nice article on CSS-Tricks关于 border-radius
。
关于html - border-radius 生成eclipse,需要90度圆 Angular 。 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42165026/