圆角渐变色边框
效果图:
<!doctype> <html> <style> body { background-color: #06375a; } .list-wrap { position: relative; width: 300px; height: 300px; margin: 100px auto; background: rgba(7, 4, 99, 0.85); border-radius: 10px; } .top-left, .top-right, .bottom-left, .bottom-right { position: absolute; width: 40%; padding-bottom: 40%; border: 1px solid transparent; background-clip: padding-box, border-box; background-origin: padding-box, border-box; z-index: -1; } .top-left { top: -1px; left: -1px; border-top-left-radius: 10px; background-image: linear-gradient( to bottom right, rgba(7, 4, 99, 0.7) 0, rgba(7, 4, 99, 0.27) 20%, rgba(7, 4, 99, 0) 45% ), linear-gradient( to bottom right, rgba(11, 57, 222, 1) 0, rgba(17, 76, 229, 0.27) 20%, rgba(21, 92, 235, 0) 45%, transparent ); } .top-right { top: -1px; right: -1px; border-top-right-radius: 10px; background-image: linear-gradient( to bottom left, rgba(7, 4, 99, 0.7) 0, rgba(7, 4, 99, 0.27) 20%, rgba(7, 4, 99, 0) 45% ), linear-gradient( to bottom left, rgba(11, 57, 222, 1) 0, rgba(17, 76, 229, 0.27) 20%, rgba(21, 92, 235, 0) 45%, transparent ); } .bottom-left { bottom: -1px; left: -1px; border-bottom-left-radius: 10px; background-image: linear-gradient( to top right, rgba(7, 4, 99, 0.7) 0, rgba(7, 4, 99, 0.27) 20%, rgba(7, 4, 99, 0) 45% ), linear-gradient( to top right, rgba(11, 57, 222, 1) 0, rgba(17, 76, 229, 0.27) 20%, rgba(21, 92, 235, 0) 45%, transparent ); } .bottom-right { bottom: -1px; right: -1px; border-bottom-right-radius: 10px; background-image: linear-gradient( to top left, rgba(7, 4, 99, 0.7) 0, rgba(7, 4, 99, 0.27) 20%, rgba(7, 4, 99, 0) 45% ), linear-gradient( to top left, rgba(11, 57, 222, 1) 0, rgba(17, 76, 229, 0.27) 20%, rgba(21, 92, 235, 0) 45%, transparent ); } </style> <body> <div class="list-wrap"> <span class="top-left"></span> <span class="top-right"></span> <span class="bottom-left"></span> <span class="bottom-right"></span> </div> </body> </html>
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!