您的位置:首页 > Web前端 > CSS

css create 多边形 polygon

2016-03-24 13:05 281 查看
案例:

代码:

element.style {

width: 0;

height: 0;

/* border-left: 50px solid transparent; */

border-right: 50px solid #383030;

border-bottom: 100px solid green;

}
分析:
css 当width 为 0,height为0, border不同时,不同的border为solid时就分冲突空间,而后会均分空间,要想实现多边形,可以把某个边设置为 solid transparent透明可以实现。
另,实现椭圆,使用border-radius可用。 border-radius: 100px, 50px; 或者要实现 此现在可以使用rotate css3属性。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: