使用CSS怎样来绘制几何图形,代码是什么
Admin 2022-08-24 群英技术资讯 838 次浏览
今天就跟大家聊聊有关“使用CSS怎样来绘制几何图形,代码是什么”的内容,可能很多人都不太了解,为了让大家认识和更进一步的了解,小编给大家总结了以下内容,希望这篇“使用CSS怎样来绘制几何图形,代码是什么”文章能对大家有帮助。这次我主要总结一下用Css绘制各种形状的技巧,同时要结合before、after伪元素和定位做出一些效果。

1 #triangle-up{ 2 width: 0; 3 height:0; 4 border-left:50px solid transparent; 5 border-right: 50px solid transparent; 6 border-bottom: 70px solid #81cfa2; 7 }

1 #triangle-down { 2 width: 0; 3 height: 0; 4 border-left: 50px solid transparent; 5 border-right: 50px solid transparent; 6 border-top: 70px solid #81cfa2; 7 }

#triangle-left{
width: 0;
height:0;
border-right: 70px solid #81cfa2;
border-top: 50px solid transparent;
border-bottom:50px solid transparent;
}

#triangle-topright {
width: 0;
height: 0;
border-top: 100px solid #81cfa2;
border-left: 100px solid transparent;
}



1 .search:before { 2 border-bottom-color: #000 !important; 3 top: -11px; 4 } 5 .search:after, .search:before { 6 width: 0; 7 height: 0; 8 content: ''; 9 border-style: dashed dashed solid; 10 border-color: transparent transparent #fff; 11 border-width: 0 10px 10px; 12 overflow: hidden; 13 position: absolute; 14 top: -10px; 15 right: 10px; 16 }okaychen
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:mmqy2019@163.com进行举报,并提供相关证据,查实之后,将立刻删除涉嫌侵权内容。
猜你喜欢
这篇文章主要介绍了纯css写出爱心版加载效果的示例代码的相关资料,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
在HTML中实现两个div并排显示,方法如下:方法1:设置float浮动对需要并排显示的div设置样式:style="float:left;"<div style="float:left;">div1</div>方法2:设置div为行内样式对需
本篇文章主要的介绍了关于html5 progress标签的用法介绍,还有关于html5 progress标签的属性用法的介绍。接下来就让我们一起来看这篇文章吧
这篇文章主要介绍了CSS属性之定位属性(图文详解)的相关资料,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
css3框模型有5种属性:1、width属性,设置内容的宽度;2、height属性,设置内容的高度;3、padding属性,设置内边距;4、margin属性,设置外边距;5、border属性,设置边框。
成为群英会员,开启智能安全云计算之旅
立即注册Copyright © QY Network Company Ltd. All Rights Reserved. 2003-2020 群英 版权所有
增值电信经营许可证 : B1.B2-20140078 粤ICP备09006778号 域名注册商资质 粤 D3.1-20240008