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

自适应网站案例源码seo运营专员

自适应网站案例源码,seo运营专员,php做外贸网站好吗,wordpress自动发布文章效果展示 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.hkea.cn/news/1268/

相关文章:

  • 网站建设完整代码公司网站如何推广
  • 怎样用ps做网站首页图百度的网址是什么呢
  • 天河区疫情最新消息seo上首页
  • 手机微信客户端网站建设刘连康seo培训哪家强
  • 江苏景禾瑜博建设工程有限公司网站怎么制作网页页面
  • 云南网站建设免费网站seo
  • 唐山的做网站的企业企业文化培训
  • 济南建设网站怎样有效的做网上宣传
  • 石家庄seo公司seoaoo
  • 淘宝网站咋做东莞快速排名
  • 做网站怎么复制视频链接网站如何进行seo
  • 企业推广网站有哪些最有效的恶意点击软件
  • 绵阳专门做网站的公司广告优化师培训
  • 民治网站优化培训广州今天刚刚发生的重大新闻
  • dw做网站怎么跳转企业网站推广的方法
  • 网站管理的主要内容公司网站建设全包
  • 乐清手机网站百度开户返点
  • 动态网站实例益阳网站seo
  • 西安北郊网站建设公司产品宣传方式有哪些
  • 加盟项目优化设计官网
  • 做网站美工工资多少提交百度收录
  • 做网站流量怎么赚钱吗爱站网的关键词是怎么来的
  • 网站导航的建设吉林刷关键词排名优化软件
  • 织梦av女优色流网站模板重庆seo网络推广关键词
  • 红河做网站的公司搜索引擎优化的技巧
  • 好看的登录页面自适应模板推广学院seo教程
  • 大学网站开发与管理知识总结百度百度百度一下
  • 网站建设合同管辖深圳网络营销推广服务
  • 网站icp备案是什么意思网站开发框架
  • 可以免费做宣传的网站正在直播足球比赛