html+css实现分层金字塔的实例
建站知识 2021-07-02 22:42www.168986.cn长沙网站建设
本文主要介绍了html+css实现分层金字塔的实例,分享给大家,具体如下
先上效果再看代码
直接上代码
// html <div class="firiangle"> <div class="sanjiao"> <!-- 金字塔 --> <div class="sj sj1"></div> <div class="sj sj2"></div> <div class="sj sj3"></div> <div class="sj sj4"></div> <div class="sj sj5"></div> <!-- 右侧数据填入 --> <div class="arow descsj1"> <span class="line"></span> <span class="value" id="hgwvalue">0</span> </div> <div class="arow descsj2"> <span class="line"></span> <span class="value" id="gwvalue">0</span> </div> <div class="arow descsj3"> <span class="line"></span> <span class="value" id="zgwvalue">0</span> </div> <div class="arow descsj4"> <span class="line"></span> <span class="value" id="zwvalue">0</span> </div> <div class="arow descsj5"> <span class="line"></span> <span class="value" id="dwvalue">0</span> </div> <!-- 中间文字 --> <div class="describe describe1">很高危</div> <div class="describe describe2">高 危</div> <div class="describe describe3">中高危</div> <div class="describe describe4">中 危</div> <div class="describe describe5">低 危</div> </div> </div> // css <style> body { width: 100%; height: 100%; } .firiangle { width: 300px; height: 200px; background: #082449; } .firiangle .sanjiao { width: 308px; margin: 0 auto; position: relative; transform: translateY(-50%); -webkit-transform: translateY(-50%); : 46%; padding-right: 30px; } .firiangle .sj { margin: 0 auto; height: 0; border-: 0 solid transparent; border-right: 15px solid transparent; border-left: 15px solid transparent; border-bottom-width: 30px; border-bottom-style: solid; box-sizing: content-box; margin-bottom: 9px; } .firiangle .sj1 { width: 0; border-bottom-color: #ff0086; box-shadow: 0 10px 0 0 #007e; } .firiangle .sj2 { width: 40px; border-bottom-color: #ff3600; box-shadow: 0 10px 0 0 #ce1d00; } .firiangle .sj3 { width: 80px; border-bottom-color: #ff7f00; box-shadow: 0 10px 0 0 #d16800; } .firiangle .sj4 { width: 120px; border-bottom-color: #ffc94d; box-shadow: 0 10px 0 0 #e5912e; } .firiangle .sj5 { width: 160px; border-bottom-color: #67ce67; box-shadow: 0 10px 0 0 #499c49; } .firiangle .arow { font-size: 12px; position: absolute; } .firiangle .line { display: inline-block; height: 1px; margin-bottom: 5px; } .firiangle .value { font-size: 16px; } .firiangle .descsj1 { : 5px; margin-left: 146px; color: #ff0086; } .firiangle .descsj1 .line { width: 100px; background: #ff0086; } .firiangle .descsj2 { : 41px; margin-left: 166px; color: #ff3600; } .firiangle .descsj2 .line { width: 80px; background: #ff3600; } .firiangle .descsj3 { : 81px; margin-left: 186px; color: #ff7f00; } .firiangle .descsj3 .line { width: 60px; background: #ff7f00; } .firiangle .descsj4 { : 119px; margin-left: 206px; color: #ffc94d; } .firiangle .descsj4 .line { width: 40px; background: #ffc94d; } .firiangle .descsj5 { : 159px; margin-left: 226px; color: #67ce67; } .firiangle .descsj5 .line { width: 20px; background: #67ce67; } .firiangle .describe { position: absolute; margin-left: 135px; font-size: 12px; color: #ffffff; } .firiangle .describe1 { : 10px; } .firiangle .describe2 { : 46px; } .firiangle .describe3 { : 86px; } .firiangle .describe4 { : 124px; } .firiangle .describe5 { : 163px; } </style>
到此这篇关于html+css实现分层金字塔的实例的文章就介绍到这了,更多相关html分层金字塔内容请搜索狼蚁SEO以前的文章或继续浏览狼蚁网站SEO优化的相关文章,希望大家以后多多支持狼蚁SEO!
上一篇:html+css实现文字折叠特效实例
下一篇:html+css实现赛博朋克风格按钮
长沙网站设计
- 如何进行东阳SEO关键词优化?
- 边坝哪有关键词排名优化:提升你的网站流量与
- 安国百度优化服务:提升您的在线可见性
- 阜康新手做SEO怎么做
- 山西seo网站排名关键词优化:提升您网站曝光率
- 临沂seo网站排名关键词优化:提高你的网站可见
- 广西SEO网站推广怎样付费比较合理
- 双辽SEO网站推广:提升你的网站可见性与流量
- 辽宁企业网站优化购买方式有哪些
- 提升宝清百度SEO排名的实用技巧与策略
- 静宁百度SEO排名:提升您网站曝光率的关键策略
- 彭州百度SEO排名的提升策略和实施指南
- 广南百度关键词SEO:提升网站排名的关键策略
- 辽宁关键词优化怎么做论坛营销
- 吉林百度seo排名如何做到让用户满意
- 内黄百度优化服务:提升在线可见性的关键