css create 多边形 polygon
2024-08-31 05:59:15
案例: 代码:
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属性。
最新文章
- HDU 5053 the Sum of Cube(简单数论)
- [Python] Ubuntu12.04LTS
- 单例模式singleton
- unity, GL.TexCoord or GL.Color must put before GL.Vertex!!!
- Python文件处理(1)
- PHPStorm 安装 SASS、SCSS + Compass
- Maven-FAQ
- python 中的 args,*args,**kwargs的区别
- Kafka生产者-向Kafka中写入数据
- IDEA+快捷键
- Spring Boot/Spring Cloud
- C#-1-1-.net
- Mac提醒事项如何设置为24小时制
- http状态码204/206/200/302/303/307
- sas 获取字符串长度实例
- 利用spring-mail模块发送带附件邮件dome
- centos6安装GitLab全程详解和常见问题解决
- Integer和new Integer
- hibernate的枚举注解@Enumerated
- Spring4 MVC RESTFul WebServices CRUD实例+RestTemplate