通过一个单一的值边界半径,我们也可以提供两个-由分离/ -指定的水平和垂直两个半径的独特价值。 例如... 1 border-radius: 50px / 100px; / *水平半径,垂直半径* / 是相当于: border-top-left-radius: 50px 100px; border-top-right-radius: 50px 100px; border-bottom-right-radius: 50px 100px; border-bottom-left-radius: 50px 100px;
当你需要模仿一个微妙的,漫长的曲线,而不是一个普通的圆角,这种技术是特别有用的。例如,下面的代码可以让我们稍稍打破,从方形,导致更多的卷曲,纸张般的效果。 .box { width: 200px; height: 200px; background: #666; border-top-left-radius: 15em 1em; border-bottom-right-radius: 15em 1em; }
本站技术原创栏目文章均为中睿原创或编译,转载请注明:文章来自中睿,本站保留追究责任的权利。