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

gta5可用手机网站大全济南建设工程交易网官网

gta5可用手机网站大全,济南建设工程交易网官网,关键词首页排名代发,企业网站源码 html5+xml效果展示 CSS 知识点 filter 属性回顾 transition 属性回顾 使用单选框实现导航菜单的思路 单选框当点击完成后就会有一个:checked属性&#xff0c;可以利用这个属性来实现导航菜单底部滑动块的滑动动画和当前菜单项激活状态的管理。 整体页面结构 <div class"tab…

效果展示

在这里插入图片描述

CSS 知识点

  • filter 属性回顾

  • transition 属性回顾

  • 使用单选框实现导航菜单的思路

    单选框当点击完成后就会有一个:checked属性,可以利用这个属性来实现导航菜单底部滑动块的滑动动画和当前菜单项激活状态的管理。

整体页面结构

<div class="tabs"><!-- 单选 --><input type="radio" id="home" name="tabsMenu" /><input type="radio" id="profile" name="tabsMenu" /><input type="radio" id="likes" name="tabsMenu" /><input type="radio" id="settings" name="tabsMenu" /><input type="radio" id="notifications" name="tabsMenu" /><!-- 图标 --><div class="buttons"><label for="home"><i class="fa-solid fa-house"></i></label><label for="profile"><i class="fa-solid fa-user"></i></label><label for="likes"><i class="fa-solid fa-heart"></i></label><label for="settings"><i class="fa-sharp fa-solid fa-gear"></i></label><label for="notifications"><i class="fa-solid fa-bell"></i></label><!-- 滑块 --><div class="underline"></div></div>
</div>

实现整体布局

.tabs input {visibility: hidden;display: none;
}.buttons {position: relative;display: flex;gap: 80px;padding: 30px 40px;border-bottom: 1px solid rgba(255, 255, 255, 0.2);background: #182d3c;overflow: hidden;border-radius: 20px;
}

编写菜单图标激活后的样式

.buttons label {width: 20%;font-size: 1.75em;-webkit-text-stroke: 1px #fff;color: transparent;cursor: pointer;transition: 0.5s;
}.buttons label:hover {opacity: 1;filter: drop-shadow(0 0 10px #fff) drop-shadow(0 0 20px #fff);
}/* 通过单选框激活状态,设置图标的激活状态 */
.tabs input:nth-child(1):checked ~ .buttons label:nth-child(1),
.tabs input:nth-child(2):checked ~ .buttons label:nth-child(2),
.tabs input:nth-child(3):checked ~ .buttons label:nth-child(3),
.tabs input:nth-child(4):checked ~ .buttons label:nth-child(4),
.tabs input:nth-child(5):checked ~ .buttons label:nth-child(5) {color: #fff;opacity: 1;filter: drop-shadow(0 0 10px #fff) drop-shadow(0 0 20px #fff);
}

实现菜单底部块的样式和移动样式

.underline {position: absolute;left: 0;bottom: 0;width: 20%;height: 5px;/* 设置滑块的移动时间 */transition: 0.5s;
}.underline::before {content: "";position: absolute;left: 50%;transform: translateX(-50%);width: 40px;height: 100%;background: #fff;filter: drop-shadow(0 0 10px #fff) drop-shadow(0 0 20px #fff) drop-shadow(0 0 30px #fff) drop-shadow(0 0 50px #fff);
}.underline::after {content: "";position: absolute;left: 50%;transform: translateX(-50%);width: 40px;height: 100%;background: #fff;filter: drop-shadow(0 0 10px #fff) drop-shadow(0 0 20px #fff) drop-shadow(0 0 30px #fff) drop-shadow(0 0 50px #fff) blur(5px);
}/* 通过单选框激活状态,设置滑块的移动距离 */
.tabs input:nth-child(1):checked ~ .buttons .underline {left: 0;
}.tabs input:nth-child(2):checked ~ .buttons .underline {left: 20%;
}.tabs input:nth-child(3):checked ~ .buttons .underline {left: 40%;
}.tabs input:nth-child(4):checked ~ .buttons .underline {left: 60%;
}.tabs input:nth-child(5):checked ~ .buttons .underline {left: 80%;
}

完整代码下载

完整代码下载

http://www.hyszgw.com/news/40916.html

相关文章:

  • 企业网站管理系统用户建筑工程是干嘛的
  • 企业建设网站的过程和预算表高端外贸网站建设服装
  • 医疗软件网站建设公司活动 wordpress主题
  • htm网站开发 实训wordpress搭建工单
  • 重庆企业建站程序免费建设网站的方法
  • 中国空间站结构示意图肇庆自助网站建设系统
  • 贵阳网站建设平台广州注册公司最新流程
  • 企业网站免费企业建立企业网站有哪些优势?
  • 艺术公司网站定制工程项目建设自学网站
  • 一个免费的网站简单工程承包合同范本
  • 搜索关键词可以过得网站百度关键词检测工具
  • 阿里云网站建设方案网站各种按钮代码
  • 网站建设改版攻略wordpress主题 cosy
  • 电商网站建设基本流程图我的网站在百度搜不到了
  • 专门做爬虫的网站网址大全2345 下载这?
  • 海绵城市建设网站众展seo推广
  • 河南制作网站公司企业信息查询单在哪里打印
  • 算命网站做竞价赚钱网站开发单位
  • 做网站站长一年能赚多少钱网站建设公司找博行
  • shuwon-成都网站建设-成都网站制作-成都网络公司-蜀美网络营销型企业网站建设ppt
  • 网站建设 售后服务中山百度网站推广
  • 做设计兼职的网站有哪些装修平台app有哪些
  • 用phpmysql做网站住房和城乡建设部网站招聘
  • 网站名字词网页设计好看的网站
  • 中国十大电商做的好的网站企业宣传推广方案
  • 网站建设优化是什么鬼?网站模板下载简单的那种
  • 网站建设合同英文版重庆打卡景点排行榜
  • 镇江高端网站建设工作室电子商务网站设计思路
  • 塑胶加工东莞网站建设技术支持关闭wordpress评论
  • 网站代管理建筑企业资质查询系统