当前位置: 首页 > backend >正文

css画图形

一、效果

在这里插入图片描述

二、代码

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>实现</title><style lang="scss" scoped>.box {display: flex;padding: 10px;justify-content: space-around;flex-wrap: wrap;}div {margin-top: 10px;}.div1 {width: 0px;height: 0px;border-top: 100px solid transparent;border-left: 100px solid transparent;border-right: 100px solid transparent;border-bottom: 100px solid green;}.div2 {width: 0px;height: 0px;border: 100px solid;border-color: transparent transparent blue transparent;}.div3 {width: 200px;height: 200px;background: linear-gradient(45deg, deeppink, yellowgreen);}.div4 {width: 200px;height: 200px;background: linear-gradient(45deg, deeppink, yellowgreen 50%, yellowgreen 50%, deeppink 100%);}.div5 {width: 200px;height: 200px;border-radius: 50%;background-color: pink;}.div6 {width: 100px;height: 200px;border-radius: 100%;border-left: 100px solid red;}.div7 {width: 200px;height: 200px;background-color: yellow;clip-path: polygon(0% 0%, 100% 0%, 0% 100%);}.div8 {width: 200px;height: 200px;background-color: yellow;clip-path: polygon(50% 50%, 0% 100%, 100% 100%);}.div9 {width: 200px;height: 200px;background-color: yellow;clip-path: circle(50%);}.div10 {width: 200px;height: 200px;background-color: yellow;clip-path: circle(50% at 100% 100%);}.div11 {width: 200px;height: 200px;background-color: yellow;clip-path: ellipse(50% 100% at 100% 100%);}.div12 {width: 200px;height: 200px;background-color: yellow;clip-path: path('M 50 50 L 150 50 L 150 150 L 50 150 z');}.div13 {width: 200px;height: 200px;}.star13 {margin-top: 50px;margin-left: 50px;width: 0px;height: 0px;border-style: solid;border-color: red transparent transparent hotpink;border-width: 50px;}.div14 {width: 200px;height: 200px;}.star14 {margin-top: 50px;margin-left: 50px;width: 30px;height: 30px;border-style: solid;border-color: red yellow skyblue yellow;border-width: 40px;}.div15 {width: 200px;height: 200px;}.star15 {margin-top: 50px;margin-left: 50px;width: 30px;height: 30px;border-style: solid;border-color: transparent transparent skyblue transparent;border-width: 40px;}.div16 {width: 600px;height: 150px;display: flex;}</style>
</head>
<body>
<div class="box"><div class="div1"></div><div class="div2"></div><div class="div3"></div><div class="div4"></div><div class="div5"></div><div class="div6"></div><div class="div7"></div><div class="div8"></div><div class="div9"></div><div class="div10"></div><div class="div11"></div><div class="div12"></div><div class="div13"><div class="star13"></div></div><div class="div14"><div class="star14"></div></div><div class="div15"><div class="star15"></div></div><div class="div16"><svg><path d="M 0 50 L 150 50 L 200 75 L 150 100 L 0 100 z" fill="green"></path></svg><svg><path d="M 0 50 L 150 50 L 200 75 L 150 100 L 0 100 z" fill="red"></path></svg><svg><path d="M 0 50 L 150 50 L 200 75 L 150 100 L 0 100 z" fill="gray"></path></svg></div>
</div>
</body>
</html>
http://www.xdnf.cn/news/6359.html

相关文章:

  • 海康立体相机3DMVS软件使用不同工作模式介绍
  • vue3项目中使用CanvasEditor开箱即用(组件的形式,组件封装好了)
  • AI数字人融合VR全景:从技术突破到可信场景落地
  • Hive PredicatePushDown 谓词下推规则的计算逻辑
  • Springboot3自定义starter笔记
  • 数据科学和机器学习的“看家兵器”——pandas模块 之五
  • AI实时对话的通信基础,WebRTC技术综合指南
  • 网络安全-等级保护(等保) 2-5 GB/T 25070—2019《信息安全技术 网络安全等级保护安全设计技术要求》-2019-05-10发布【现行】
  • WebRTC技术下的EasyRTC音视频实时通话SDK,助力车载通信打造安全高效的智能出行体验
  • day 17 无监督学习之聚类算法
  • Swagger go中文版本手册
  • 虚拟Python 环境构建器virtualenv安装(macOS版)
  • Prometheus监控系统部署
  • AI 治理进行时:网信办审核加速,AI 合规刻不容缓
  • 2025.05.14华为机考笔试题-第二题-200分
  • C#语法基础
  • 第30节:现代CNN架构-轻量级架构EfficientNet
  • mysql:如何查询版本号与社区版/企业版
  • 算法分析:蛮力法
  • Redis--基础知识点--27--redis缓存分类树
  • 计算机视觉----基于锚点的车道线检测、从Line-CNN到CLRNet到CLRKDNet 本文所提算法Line-CNN 后续会更新以下全部算法
  • OneNote内容太多插入标记卡死的解决办法
  • 在Rocky Linux 9.5上部署MongoDB 8.0.9:从安装到认证的完整指南
  • 【HTML】个人博客页面
  • 为什么浏览器设置代理ip后不能上网?原因与对应解决方案
  • maven报错 You have to use a classifier to attach supplemental artifacts
  • XBL6501/02/03在POE设备上的应用方案
  • JSX语法介绍
  • python制造一个报错
  • 音频/AI/BLE/WIFI/玩具/商业等方向的论坛网站总结