建议:尽可能的手写代码,可以有效的提高学习效率和深度。
有时候我们经常发现有些矩形的某个地方会出现三角形效果,感觉挺神奇的,当然可以使用背景图片实现,这里简单介绍一下不采用背景图片的效果。代码如下:
蚂蚁部落 .parent{ width:300px; height:100px; margin:40px auto; background-color:green; position:relative;}.square{ width:0px; height:0px; border-bottom:10px solid white; border-left:10px solid white; border-right:10px solid green; border-top:10px solid green; position:absolute; left:-20px; top:10px;}
查看更多关于如何利用CSS实现三角形效果_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did110281