时间:2021-07-01 10:21:17 帮助过:85人阅读
效果图如下所示:
直接上代码!
<!DOCTYPE html> <html lang="en"> <head> <title>小三角</title> <style> .up-triangle{ width:0px; height:0px; border-bottom:30px solid #000; border-left:15px solid transparent; border-right:15px solid transparent; margin:100px auto; } .down-triangle{ width:0px; height:0px; border-top:30px solid #000; border-left:15px solid transparent; border-right:15px solid transparent; margin:100px auto; } .left-triangle{ width:0px; height:0px; border-right:30px solid #000; border-top:15px solid transparent; border-bottom:15px solid transparent; margin:100px auto; } .right-triangle{ width:0px; height:0px; border-left:30px solid #000; border-top:15px solid transparent; border-bottom:15px solid transparent; margin:100px auto; } </style> </head> <body> <p class="up-triangle"></p> <p class="down-triangle"></p> <p class="left-triangle"></p> <p class="right-triangle"></p> </body> </html>
相关推荐:
jQuery操作css样式教程
Angular4中如何显示内容的CSS样式示例代码
小程序之基础知识css样式media标签详解
以上就是CSS样式实现选择框右侧小三角实例的详细内容,更多请关注Gxl网其它相关文章!