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

岳池发展建设集团有限公司门户网站湛江seo咨询

岳池发展建设集团有限公司门户网站,湛江seo咨询,天元建设集团有限公司六大板块,那个视频网站可以做gifcss实现鼠标悬停时元素的显示与隐藏 跟着B站黑马学习小兔鲜项目#xff0c;有个点记录一下 就是当鼠标悬浮在商品列表上时#xff0c;列表中的商品会显示出来#xff0c;离开时#xff0c;商品隐藏#xff0c;如下#xff1a; 感觉这个功能经常会遇到#xff0c;但一直…css实现鼠标悬停时元素的显示与隐藏 跟着B站黑马学习小兔鲜项目有个点记录一下 就是当鼠标悬浮在商品列表上时列表中的商品会显示出来离开时商品隐藏如下 感觉这个功能经常会遇到但一直没弄明白具体怎么实现的现在仔细学习了一下总算搞清楚了 先上代码 templatediv classhome-categoryul classmenuli v-foritem in categoryStore.categoryList :keyitem.idRouterLink to/{{ item.name }}/RouterLinkRouterLink to/ v-fori in item.children.slice(0, 2) :keyi.id{{ i.name }}/RouterLinkdiv classlayerh4分类推荐small根据您的购买或浏览记录推荐/small/h4ulli v-fori in item.goods :keyi.idRouterLink to/img :srci.picture altdiv classinfop classname ellipsis-2{{ i.name }}/pp classdesc ellipsis{{ i.desc }}/pp classpricei¥/i{{ i.price }}/p/div/RouterLink/li/ul/div/li/ul/div /templatescript setup import { useCategoryStore } from /stores/category; // import { onMounted } from vueconst categoryStore useCategoryStore() // onMounted(() console.log(categoryStore.categoryList)) /scriptstyle langscss scoped .home-category {width: 250px;height: 500px;background: rgba(0, 0, 0, 0.8);position: relative;z-index: 99;.menu {li {padding-left: 40px;height: 55px;line-height: 55px;:hover {background: $xtxColor;}a {margin-right: 4px;color: #fff;:first-child {font-size: 16px;}}.layer {width: 990px;height: 500px;background: rgba(255, 255, 255, 0.8);position: absolute;left: 250px;top: 0;display: none;padding: 0 15px;h4 {font-size: 20px;font-weight: normal;line-height: 80px;small {margin-left: 10px;font-size: 16px;color: #666;}}ul {display: flex;flex-wrap: wrap;li {width: 310px;height: 120px;margin-right: 15px;margin-bottom: 15px;border: 1px solid #eee;border-radius: 4px;background: #fff;:nth-child(3n) {margin-right: 0;}a {display: flex;width: 100%;height: 100%;align-items: center;padding: 10px;:hover {background: #e3f9f4;}img {width: 95px;height: 95px;}.info {padding-left: 10px;line-height: 24px;overflow: hidden;.name {font-size: 16px;color: #666;}.desc {color: #999;}.price {font-size: 22px;color: $priceColor;i {font-size: 16px;}}}}}}}// 关键样式 hover状态下的layer盒子变成block:hover {.layer {display: block;}}}} } /style上面是完整代码关键在于layer的样式 首先看正常情况下鼠标未悬浮时layer的样式 .layer {width: 990px;height: 500px;background: rgba(255, 255, 255, 0.8);position: absolute;left: 250px;top: 0;display: none;padding: 0 15px; }display:none;实际上就是隐藏元素 再看看悬浮时layer的样式 // 关键样式 hover状态下的layer盒子变成block:hover {.layer {display: block;}}注意悬浮是悬浮在layer的父元素也就是menu上悬浮时设置display:block即可展示layer 总结一下 display: none;隐藏元素display:block;显示元素悬浮时设置
http://www.w-s-a.com/news/101913/

相关文章:

  • 手机网站工具关键词排名是什么意思
  • 游民星空是谁做的网站沈阳网站托管公司
  • 做网站搭建需要什么人vs2017移动网站开发
  • 购物网站开发需要什么技术怎么查看网站是否备案
  • 学做电商那个网站好网站建设投票主题
  • 中卫网站推广网络营销毕业设计做网站大小有什么要求
  • 做问卷网站义乌网站建设推广专家
  • 不会编程怎样建设网站昆明做网站哪家
  • 直播网站模板新营销平台电商网站
  • 建设部指定招标网站免费的企业查询软件
  • 做前端常用的网站及软件下载平台优化是什么意思
  • 企石镇仿做网站wordpress 网站白屏
  • 班级网站建设规划书专业定制网红变色杯
  • 上海网站设计公司电话甘肃路桥建设集团有限公司官方网站
  • 哈尔滨网站建设网站开发陕西省建设监理工程协会网站
  • 微信公众号电商网站开发wordpress增加论坛
  • 网站建设视频百度网盘下载免费wordpress搭建
  • 哈尔滨市网站建设公司汕头市公司网站建设平台
  • 东莞网站建设方案外包甘肃两学一做网站
  • 网站建设优化排名推广平面设计职业学校
  • 网后台的网站怎么做网站代理商
  • 网站如何转移到新的空间服务器上手机无人区离线地图app
  • 网站建设模板的买域名做网站的坏处
  • 长春做网站qianceyun做景观素材有哪几个网站
  • 自己建的网站也要注册域名吗邯郸市做网站
  • 天津网站建设制作软件潍坊个人做网站
  • 重庆城市建设集团官方网站php用什么做网站服务器
  • 深圳坪山站重庆市园林建设有限公司网站
  • 网站建设图片教程如何用自己的电脑建网站
  • 《网页设计与网站建设》A卷答案广东新闻联播