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

安全的集团网站建设wordpress 时光捕手

安全的集团网站建设,wordpress 时光捕手,甘肃省城乡与建设厅网站首页,网址免费制作app前言: 本文章将分享一些我这周在制作京东页面的实现部分,页面表面大体和京东页面差不多,在里面加了一点script,但是很容易理解,希望大家看到可以有所收获,如果我有哪部分写的不太好,欢迎大家来跟我交流! #x1f970;个人主页:心.c #x1f973;文章专题:京东页面制作 #… 前言: 本文章将分享一些我这周在制作京东页面的实现部分,页面表面大体和京东页面差不多,在里面加了一点script,但是很容易理解,希望大家看到可以有所收获,如果我有哪部分写的不太好,欢迎大家来跟我交流! 个人主页:心.c 文章专题:京东页面制作 欢迎大家点赞❤️收藏 京东 关于这个页面,我想分享一下页面中头部的黏性定位,这个定位实现是我自己写的,关于script是本人在AL上搜的,希望可以对大家有帮助,大家有不清楚的地方都欢迎随时来问我. HTML 下面HTML代码中是视频中关于鼠标滚动时出现的头部搜索区域和头部导航区域, 大致就是当页面高度达到一定位置时,头部的黏性定位就会弹出来,然后加上一些动画(animation),设置时间和位置就可以更加自然的显示出来 !-- 设置黏性定位区域 --div classnoface-search idstickyElementdiv classwrapperdiv classinit-logoimg src./images/logo2.png alt/divdiv classinit-searchdiv classsearch-boxinput typetext placeholder请输入关键字div classphoto-btnspan classiconfont icon-xiangji/span/divdiv classsearch-btnspan classiconfont icon-sousuo/span/div/divdiv classcarti classiconfont icon-gouwu/ia href#我的购物车/adivspan0/span/div/div/div/div/div!-- 设置黏性导航区域 --div classnoface-nav idstickyElement1div classwrapperdiv classcontent_navulli classactivea href#divh3精选/h3/divspan猜你喜欢/span/a/lidiv classthread/divli classnormala href#h3智能先锋/h3span大电器械/span/a/lidiv classthread/divli classnormala href#h3居家优品/h3span品质生活/span/a/lidiv classthread/divli classnormala href#h3超市百货/h3span百货生鲜/span/a/lidiv classthread/divli classnormala href#h3时尚达人/h3span美妆穿搭/span/a/lidiv classthread/divli classnormala href#h3进口好物/h3span京东国际/span/a/li/ul/div/div/div CSS 关于顶部导航区域的css样式和下面content导航中的css共用的一个,也因为css样式几乎完全一样就多了个黏性碰撞,没有其他什么变化,所以这里就不展示了;关于下面的css样式,大家可以参考,如果有什么问题可以私信我 .wrapper {margin: 0 auto;width: 1190px; }/* 设置黏性搜索区域 */ .noface-search {padding: 0 20px;height: 51px;background-color: #ffffff;position: -webkit-sticky;position: sticky;top: 0px;/* 距离顶部的距离 */border-bottom: 3px solid #e22525;z-index: 300;/* 确保粘性元素在其他内容上方 */display: none;/* 初始隐藏 */animation: ease1 0.8s ease; }.noface-search .init-logo img {height: 48px;width: 125px;background-size: cover; }keyframes ease1 {from {transform: translateY(-50px);}to {transform: translateY(0px);} }.noface-search .wrapper {display: flex;}.init-search {margin-top: 7px;padding-left: 150px;display: flex; }.init-search .search-box {position: relative;display: flex;width: 487px;height: 36px;border: 2px solid #e53232;margin-right: 30px; }.init-search .search-box input {flex: 1;border: 0;background-color: transparent;outline: none;padding-left: 15px; }.init-search .search-box input::placeholder {font-size: 12px;color: #c0c0c0; }.init-search .photo-btn .iconfont {position: absolute;left: 388px;top: -8px;font-size: 30px;color: #c4c4c4;cursor: pointer; }.init-search search-box {position: relative;display: flex;width: 487px;height: 30px;border: 2px solid #cb5050;margin-right: 20px; }.init-search .search-box input {flex: 1;border: 0;background-color: transparent;outline: none;padding-left: 15px; }.init-search .search-box input::placeholder {font-size: 12px;color: #c0c0c0; }.init-search .photo-btn .iconfont {position: absolute;left: 388px;top: -8px;font-size: 30px;color: #c4c4c4;cursor: pointer; }.init-search .search-box .search-btn {text-align: right;right: -58px;width: 58px;background-color: #cb5050;text-align: center;cursor: pointer; }.init-search .search-btn .iconfont {color: #ffffff;font-size: 30px;line-height: 32px; }.init-search .cart {position: relative;width: 131px;height: 36px;border: #e9e9e9 1px solid;line-height: 32px;text-align: center; }.init-search .cart .iconfont {font-size: 30px;color: #cb5050;vertical-align: middle; }.init-search .cart a {font-size: 11px;color: #cb5050; }.init-search .cart div {padding: 1px 5px;position: absolute;top: 2px;left: 33px;height: 13px;border-radius: 7px;background-color: #cb5050;}.init-search .cart div span {display: block;margin-top: -10px;color: #fff;font-size: 8px; }/* 设置黏性导航区域 */ .noface-nav {padding: 0 20px;height: 61px;background-color: #ffffff;position: -webkit-sticky;position: sticky;top: 51px;/* 距离顶部的距离 */z-index: 233;/* 确保粘性元素在其他内容上方 */display: none;/* 初始隐藏 */animation: change 0.7s ease; }keyframes change {from {transform: translateY(-54px);}to {transform: translateY(0px);} }script 这个是我自己直接引入修改了高度,如果大家有更加合适的当然可以 scriptwindow.onscroll function () { scrollFunction() };function scrollFunction() {// 当滚动高度大于等于500像素时显示粘性元素否则隐藏if (document.body.scrollTop 600 || document.documentElement.scrollTop 600) {document.getElementById(stickyElement).style.display block;} else {document.getElementById(stickyElement).style.display none;}if (document.body.scrollTop 900 || document.documentElement.scrollTop 900) {document.getElementById(stickyElement1).style.display block;} else {document.getElementById(stickyElement1).style.display none;}}/script到这里我的分享就结束了,如果大家想要了解更多或者想要小编的源码,都可以在评论区里面私信我哦! 欢迎大家和我一起探讨 ! ! !
http://www.w-s-a.com/news/538572/

相关文章:

  • 网站认证金额怎么做分录网页无法访问是怎么回事
  • 樟木头建网站的wordpress自适应吸附菜单
  • 番禺网站设计威海微网站建设
  • 新乡网站建设服务网站建设的点子
  • 赛罕区城乡建设局网站什么是新媒体运营
  • 松原企业网站建设设计素材网排名
  • 网站建设是那个行业广东公司排名
  • 制作网站要多少钱seo是如何优化
  • 求个网站2020急急急做金融网站拘留多久
  • 网站后台管理系统怎么进seo网络推广外包公司
  • 中山市 做网站网站建设如何上传文件
  • 网站呢建设公众号制作要求
  • 网站备案证明在自己电脑上做网站
  • 沈阳旅游团购网站建设怎么制作网站搜索窗口
  • 做化学合成的网站有哪些枣庄住房和城乡建设局网站
  • 天猫优惠券网站怎么做的网络连接
  • 保定网站建设多少钱公司网页网站建设+ppt模板下载
  • 用户上传商品网站用什么做建设跳转公积金网站
  • 买程序的网站上海市网站建设公司
  • 南通网站建设排名公司哪家好wordpress网站图片迁移
  • 河南省汝州文明建设门户网站博客网站建设源码
  • 单位建设网站的请示手机移动端网站案例
  • 国内做网站的企业网站结构有哪些类型
  • 南通网站建设制作公司苏州好的网站公司名称
  • 咸阳做网站开发公司哪家好珠海公司制作网站
  • 深圳网站建设好不好医疗网站前置审批
  • 做ic什么网站好安溪网站建设
  • 网站建设 慕课企业文化标语经典
  • 做短视频的网站都有哪些简约 时尚 高端 网站建设
  • 浦口区网站建设售后服务建设一个网站多少钱