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

石家庄市网站建设培训班劳动局免费培训项目

石家庄市网站建设培训班,劳动局免费培训项目,网站建设公司推广网站品牌运营,欧亚快递100用CSS实现导航流程图的样式。可根据自己的需求进行修改,代码精略的写了一下。 注:场景一和场景二在分辨率比较低的情况下会有一个1px的缝隙不太优雅,自行处理。有个方法是直接在每个外面包一个DIV,用动态样式设置底色。 场景一、…

 用CSS实现导航流程图的样式。可根据自己的需求进行修改,代码精略的写了一下。

注:场景一和场景二在分辨率比较低的情况下会有一个1px的缝隙不太优雅,自行处理。有个方法是直接在每个外面包一个DIV,用动态样式设置底色。

场景一、实现效果图的导航栏

代码部分:

/** 组件:步骤条样式 */
const StepModel = (list: any) => {return (<><div className={styles.step}>{list.map((item: any) => {return (<divclassName={`${styles.stepMenu} ${item.success ? styles.successText : styles.defaultText} ${item.status ? styles.stepMenuActive : ''}`}>{item.success ? (<><div className={`${styles.icon} ${styles.iconSuccess}`}><img src={require(`@/assets/imgs/success.png`)} alt="" /></div></>) : (<><imgclassName={styles.icon}src={require(`@/assets/imgs/${item.activeIcon ? item.activeIcon : item.icon}.png`)}alt=""/></>)}{item.name}</div>);})}</div></>);
};/** 组件样式 */
.step {width: 100%;height: 32px;margin-top: 8px;font-size: 12px;font-weight: 400;display: flex;justify-content: space-between;filter: drop-shadow(-1px 1px 9px rgba(8, 38, 55, 0.1));.successText {color: #222222;}.defaultText {color: #788295;}.stepMenu {padding: 0px 10px 0 30px;line-height: 32px;background: white;display: flex;align-items: center;position: relative;flex-basis: calc((100%) / 5);.icon {width: 16px;height: 16px;margin-right: 8px;}.iconSuccess {background: #00b864;border-radius: 50%;display: flex;align-items: center;justify-content: center;}}/** 箭头样式 */.stepMenu:after {content: '';display: block;position: absolute;right: -11px;top: 5px;z-index: 10;border-left: 15px solid white;border-top: 7px solid white;border-right: 7px solid transparent;border-bottom: 15px solid transparent;transform: rotate(135deg);border-top-left-radius: 6px;filter: drop-shadow(-3px -4px 2px rgba(8, 38, 55, 0.1));}/** 选中样式 */.stepMenuActive {color: #fff;background: linear-gradient(to right, #60c9fc, #296be8);font-weight: 700;}/** 选中样式:箭头 */.stepMenuActive:after {border-left: 16px solid #296be8;border-top: 7px solid #296be8;border-right: 7px solid transparent;border-bottom: 16px solid transparent;}/** first 样式加圆角 */.stepMenu:first-child {border-radius: 4px 0 0 4px;padding-left: 18px;}/** last 样式加圆角 */.stepMenu:last-child {border-radius: 0px 4px 4px 0px;padding-right: 18px;}.stepMenu:last-child:after {display: none;}
}

场景二:实现效果图

效果图:

代码:直接引入的在线JQ

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8" /><title>Title</title><style>body {padding: 50px 20px 0 20px;}.step {width: 100%;height: 32px;margin-top: 8px;font-size: 12px;font-weight: 400;display: flex;justify-content: space-around;}.step > div {padding: 0px 10px 0 30px;line-height: 32px;background: #dceefe;display: inline-block;color: #1e9fff /*#50abe4*/;position: relative;width: 16%;}.step div:after {content: "";display: block;border-top: 16px solid transparent;border-bottom: 16px solid transparent;border-left: 17px solid #dceefe;position: absolute;right: -17px;top: 0;}.step div:after {content: "";display: block;border-top: 16px solid transparent;border-bottom: 16px solid transparent;border-left: 17px solid #dceefe;position: absolute;right: -17px;top: 0;z-index: 10;}.step div:before {content: "";display: block;border-top: 16px solid #dceefe;border-bottom: 16px solid #dceefe;border-left: 17px solid #fff;position: absolute;left: 0px;top: 0;}.step div:first-child {border-radius: 4px 0 0 4px;padding-left: 18px;}.step div:last-child {border-radius: 0px 4px 4px 0px;padding-right: 18px;}.step div:first-child:before {display: none;}.step div:last-child:after {display: none;}.step div.active {background: #1e9fff;color: #fff;}.step div.active:after {border-left-color: #1e9fff;}.step div.active:before {border-top: 16px solid #1e9fff;border-bottom: 16px solid #1e9fff;}</style></head><body><div class="step"><div class="active">第一步</div><div>第二步</div><div>第三步</div><div>第四步</div><div>第五步</div></div><script src="https://cdn.staticfile.org/jquery/3.6.0/jquery.min.js"></script><script type="text/javascript">$(function () {gotoStep(2);});function gotoStep(step) {$(".step div").removeClass("active"); // 移除所有 div 的 active 类$(".step div").eq(step - 1).addClass("active"); // 给指定索引的 div 添加 active 类}</script></body>
</html>

http://www.ds6.com.cn/news/120473.html

相关文章:

  • 门户网站有哪些关键词优化排名用哪个软件比较好
  • 外国做动漫图片的网站叫什么网络营销策略包括哪几大策略
  • 政府的网站用什么系统做的如何做一个自己的电商平台
  • 做301跳转会影响之前网站排名吗品牌策划方案模板
  • 自己搭建服务器网站开发软件it培训学校哪家好
  • 做地方行业门户网站需要什么资格高质量外链
  • 怎么免费把自己在dreamweaver做的网站放到网上去营销推广是干什么的
  • 做网站霸屏公司销售好做吗地推推广方案
  • 企业网站城市分站系统沈阳今天刚刚发生的新闻
  • 做自媒体网站青岛网络推广公司哪家好
  • 夜场网站建设兰州seo技术优化排名公司
  • 滨湖网站建设网站优化排名易下拉软件
  • 怎做网站十大外贸电商平台
  • 广东建设厅网站最新的网络营销方式
  • cvm服务器做网站文件关键词搜索工具
  • 网站开发技术说明文档网站开发的基本流程
  • 做网站可以找设计公司吗石家庄疫情防控最新政策
  • 长春建站模板搭建一键关键词优化
  • 西安网站建设网站建设推推蛙seo
  • 了解网站开发的背景长沙网站包年优化
  • 找网络公司做网站要注意这4个细节深圳百度网站排名优化
  • 网站开发的售后 维保网页制作教程视频
  • 百度网站怎么做的百度大搜推广开户
  • 系统建站百度权重排名
  • 环保主题的网站模板中国企业网络营销现状
  • 学校网站建设汇报ppt百度游戏app下载
  • wordpress分类树网站排名优化培训哪家好
  • 宁波网站建设用什么软件网络科技有限公司
  • 北京网站建设签约珠海网站建设优化
  • 做网站免费吗张家港seo建站