惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
CXSECURITY Database RSS Feed - CXSecurity.com
K
Kaspersky official blog
A
Arctic Wolf
Attack and Defense Labs
Attack and Defense Labs
L
LINUX DO - 热门话题
N
News | PayPal Newsroom
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
L
Lohrmann on Cybersecurity
PCI Perspectives
PCI Perspectives
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
The Last Watchdog
The Last Watchdog
B
Blog RSS Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
W
WeLiveSecurity
Know Your Adversary
Know Your Adversary
博客园 - Franky
T
Tenable Blog
T
Tailwind CSS Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Help Net Security
Help Net Security
WordPress大学
WordPress大学
T
The Exploit Database - CXSecurity.com
www.infosecurity-magazine.com
www.infosecurity-magazine.com
博客园 - 司徒正美
阮一峰的网络日志
阮一峰的网络日志
D
Darknet – Hacking Tools, Hacker News & Cyber Security
H
Heimdal Security Blog
TaoSecurity Blog
TaoSecurity Blog
S
Security Affairs
J
Java Code Geeks
小众软件
小众软件
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Apple Machine Learning Research
Apple Machine Learning Research
NISL@THU
NISL@THU
O
OpenAI News
The Cloudflare Blog
月光博客
月光博客
Google Online Security Blog
Google Online Security Blog
V
V2EX
罗磊的独立博客
美团技术团队
博客园 - 三生石上(FineUI控件)
Security Latest
Security Latest
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
Cyber Attacks, Cyber Crime and Cyber Security
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Cyberwarzone
Cyberwarzone
L
LINUX DO - 最新话题
Hacker News - Newest:
Hacker News - Newest: "LLM"
大猫的无限游戏
大猫的无限游戏

博客园 - ccfyyn

计算机原理 vue项目实战——网上商城项目 跨域 面试总结 npm&node.js ES6 输入URL到页面展现的过程 不同分辨率页面自适应 jquery中bind与on的区别 offsetheight和clientheight和scrollheight的区别以及offsetwidth和clientwidth和scrollwidth的区别 浏览器兼容 git代码提交 bootstrap的用法、bootstrap图标 HTML 5 Web 存储(客户端存储数据) require.js event事件 $().each 和 $each( )的区别 date-id自定义属性 css水平垂直居中
项目经验
ccfyyn · 2017-12-01 · via 博客园 - ccfyyn

1.给A元素的子元素B,在A hover的时候B显示,当离开A元素时B元素隐藏

当鼠标滑过关注微信的时候,显示

鼠标离开关注微信这个区域

   <div class="head_span Tbarweixin">
<div> <span > <img src="weixin.png" class="cear"></span> <span><a href="#">关注微信</a></span>
</div> <div class="TbarweixinBox"> <img src="erweima.jpg" class="qr_code"> <span class="name"> <span> <img src="weixin_red.png"></span> <span>weituanche</span> </span> </div> </div>

思路:1.需要三个div

2.将"关注微信"所在的div的高度为  与父类元素高度一样(即最外层的div)

 3.将父类div的样式设置为:

      父类元素类名{

overflow:“hidden"}

父类元素类名:hover{

overflow:visible}

第二个div的位置设置:

1.给点击产生让子类显示或者隐藏效果的父类  Tbarweixin的css中设置position:relative

            2.给需要显示隐藏的子类元素设置postion:absolut等

2.数据分析 

鼠标移动动重庆上的时候,会显示出如下的列表。

要实现这样的效果,我们需要哪些数据呢?和后台沟通需要哪些数据?

所需数据分析:对于每个城市,我们需要获取该城市名(name),和该城市对应的id或者其他的;

1.首先服务器返回来的是一个data对象。即data{}

2.分析上面的城市信息,又分为两大部分:

   1。热门城市

   2。A,B,C等各个列表

   因此,data对象里的数据,可以分为两个数组:

data{

      hot:[

              { index:“A”,

                name:"北京",

               href:"http://bj.tuanche.com/"

            },

            {index:“T”,

             name:“天津”,

             href:“"http://bj.tuanche.com/”

            }

           ......

      ],

  common[
{index:"A",
citis:[{index:"
A",
name"安庆",
href:"http://aq.tuanche.com/"
            },
{index:"A",
name:"安阳",
href:"
http://aq.tuanche.com/"
             },
{index:"A",
                   name:"阿克苏",
href:"http://aks.tuanche.com/"}]},

{index:"B",


citis:[{index:"B",
name:"北京",
href:"
http://bj.tuanche.com/"},

{index:"B",
name:"保定",
href:“

http://bd.tuanche.com/
            }
......
      ]
......
  }

    ]

}

3.

 例如城市名“成都”换行要换行一起换,不会在上下行中拆开写。给<span>成都</span> 的css设置属性display:inline-block