介绍
我们学习如何使用简单的CSS来创建不同类型的平面图形。
使用代码
矩形

.rectangle { width: 250px; height: 150px; background-color: #6DC75F;}
三角形

.triangleUp { border-left: 75px solid transparent; border-right: 75px solid transparent; border-bottom: 150px solid #6DC75F; width: 0; height: 0; }
椭圆形

.oval { width: 300px; height: 150px; background: #6DC75F; -moz-border-radius: 150px / 75px; -webkit-border-radius: 150px / 75px; border-radius: 150px / 75px;}
月牙形

.moon { width: 150px; height: 150px; border-radius: 50%; box-shadow: 15px 15px 0 0 green;}
树叶

.leaf { border-radius: 5px 300px 3px 300px; background: #6DC75F; width: 150px; height: 150px;}
<!–
查看更多
–>
以上就是使用CSS创建各种不同的图形形状的方法的详细内容,更多请关注创想鸟其它相关文章!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/1608168.html
微信扫一扫
支付宝扫一扫