上海-逆天人物 画的 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>css 画图</title> <style type="text/css"> .div1{ position:relative; margin:100px; width:460px; height:250px; border:#f60 2px solid; background-image:linear-gradient(to right top,transparent 50%,#f60 50%,#f60 calc(50% + 3px),transparent calc(50% + 3px)); } .div2{ margin:100px; width:260px; height:80px; background-color:#f60; background-image:linear-gradient(-135deg,transparent 35%,#369 35%), linear-gradient(-45deg,transparent 35%,#369 35%); background-repeat:no-repeat; background-size:100% 50%; background-position:right top,bottom right; border-radius:10px 0 0 10px; } </style> </head> <body> <div class="div1"></div> <div class="div2"></div> </body> </html> 提示:你可以先修改部分代码再运行。 转载请注明:有爱前端 » css 画图 喜欢 (2)or分享 (0)