纯css图标
/*对号*/ .gou{ width: 9px; height: 18px; border-right:2px solid #f39800; border-bottom:2px solid #f39800; transform: rotate(40deg); } /*叉号*/ .cha{ width: 20px; height: 20px; margin: auto; position: relative; } .cha::before, .cha::after{ content: ""; position: absolute; /*方便进行定位*/ height: 20px; width: 1.5px; top: 2px; right: 9px; /*设置top和right使图像在20*20框中居中*/ background: #f39800; } .cha::before{ transform: rotate(45deg); /*进行旋转*/ } .cha::after{ transform: rotate(-45deg); } /*上三角*/ .triangle{ position: relative; } .triangle::after { content: ''; width: 0; height: 0; border: 0.5rem solid transparent; border-bottom: 0.5rem solid #000; position: absolute; top: -1rem; left: 48%; transform: translateX(-50%); z-index: 100; } /*大于号*/ .greater{ position: relative; } .greater:after{ content: ''; width: 12px; height: 12px; position: absolute; right: 5px; bottom: 5px; border-left: 2px solid #000; border-bottom: 2px solid #000; transform: translate(0,-50%) rotate(-135deg); }
很多图标也可以通过content字符实现,例如 通过css实现对勾(√)和叉号(×), 能用content字符实现的图标有,各种箭头,大于小于号,对号(样式有问题),叉号,各种三角,星号,
雪花,象棋,扑克牌,希腊字母,天空,植物,手型,铅笔,笔型,十字等,可首选content字符来实现图标。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
2020-03-16 深拷贝总结
2016-03-16 css3d总结
2016-03-16 safari 回调中window.open无法执行