CSS3伪元素之Before/After_html/css_WEB-ITnose
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了CSS3伪元素之Before/After_html/css_WEB-ITnose,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含8248字,纯文字阅读大概需要12分钟。
内容图文
![CSS3伪元素之Before/After_html/css_WEB-ITnose](/upload/InfoBanner/zyjiaocheng/407/d8d2272eafca4041b5866b55a20d18ef.jpg)
body{ font-family: cursive; font-size: 14px; } .left{ width:150px; height: 50px; background: #fff; position: relative; margin: 50px 0 0 50px; line-height: 50px; text-align: center; border: 2px solid green; border-radius: 5px; } .left:before{ content: ' '; position: absolute; width: 0; height: 0; left: -30px; top: 10px; border: 15px solid; border-color: transparent green transparent transparent; } .left:after{ content: ' '; position: absolute; width: 0; height: 0; left: -27px; top: 10px; border: 15px solid; border-color: transparent #fff transparent transparent; } .right{ width:150px; height: 50px; background: #fff; position: relative; margin: 50px 0 0 50px; line-height: 50px; text-align: center; border: 2px solid green; border-radius: 5px; } .right:before{ content: ' '; position: absolute; width: 0; height: 0; right: -30px; top: 10px; border: 15px solid; border-color: transparent transparent transparent green; } .right:after{ content: ' '; position: absolute; width: 0; height: 0; right: -27px; top: 10px; border: 15px solid; border-color: transparent transparent transparent #fff; } .up{ width:150px; height: 50px; background: #fff; position: relative; margin: 50px 0 0 50px; line-height: 50px; text-align: center; border: 2px solid green; border-radius: 5px; } .up:before{ content: ' '; position: absolute; width: 0; height: 0; left:60px; top: -30px; border: 15px solid; border-color: transparent transparent green transparent ; } .up:after{ content: ' '; position: absolute; width: 0; height: 0; left:60px; top: -27px; border: 15px solid; border-color: transparent transparent #fff transparent; } .down{ width:150px; height: 50px; background: #fff; position: relative; margin: 50px 0 0 50px; line-height: 50px; text-align: center; border: 2px solid green; border-radius: 5px; } .down:before{ content: ' '; position: absolute; width: 0; height: 0; left:60px; top: 50px; border: 15px solid; border-color: green transparent transparent transparent ; } .down:after{ content: ' '; position: absolute; width: 0; height: 0; left:60px; top: 48px; border: 15px solid; border-color: #fff transparent transparent transparent ; } .line{ width:150px; height: 50px; background: #fff; position: relative; margin: 50px 0 0 50px; line-height: 50px; text-align: center; border: 2px solid green; border-radius: 5px; } .line:before{ border-bottom: 1px solid #3ca156; -webkit-transform: skewY(30deg); transform: skewY(30deg); content: ''; width: 92px; position: absolute; left: 30px; top: 50%; } .line:after{ border-bottom: 1px solid #3ca156; -webkit-transform: skewY(-30deg); transform: skewY(-30deg); content: ''; width: 92px; position: absolute; left: 30px; top: 50%; } .fork{ color: #fff; width:150px; height: 60px; background: #fff; position: relative; margin: 50px 0 0 50px; line-height: 60px; text-align: center; background: green; } .fork:before{ content: ""; border: 30px solid; border-color: transparent transparent transparent #fff; position: absolute; top: 0px; left: 0px; } .fork:after{ content: ""; border: 30px solid; border-color: transparent transparent transparent green; position: absolute; top: -0px; right: -60px; } .fork-left{ color: #fff; width:150px; height: 60px; background: #fff; position: relative; margin: 50px 0 0 50px; line-height: 60px; text-align: center; background: green; border-radius: 5px; } .fork-left:before{ content: ""; border: 30px solid; border-color: transparent transparent transparent #fff; position: absolute; top: 0px; left: 0px; } .fork-right{ color: #fff; width:150px; height: 60px; background: #fff; position: relative; margin: 50px 0 0 50px; line-height: 60px; text-align: center; background: green; border-radius: 5px; } .fork-right:after{ content: ""; border: 30px solid; border-color: transparent #fff transparent transparent; position: absolute; top: 0px; right: 0; } .fork-up{ color: #fff; width:60px; height: 150px; background: #fff; position: relative; margin: 50px 0 0 50px; line-height: 150px; text-align: center; background: green; border-radius: 5px; } .fork-up:after{ content: ""; border: 30px solid; border-color: transparent transparent #fff transparent; position: absolute; top: 90px; right: 0; } .fork-down{ color: #fff; width:60px; height: 150px; background: #fff; position: relative; margin: 50px 0 0 50px; line-height: 150px; text-align: center; background: green; border-radius: 5px; } .fork-down:before{ content: ""; border: 30px solid; border-color: #fff transparent transparent transparent; position: absolute; top: 0; right: 0; }
内容总结
以上是互联网集市为您收集整理的CSS3伪元素之Before/After_html/css_WEB-ITnose全部内容,希望文章能够帮你解决CSS3伪元素之Before/After_html/css_WEB-ITnose所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。