Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css] 第389天 除了可以用js跟踪用户信息外,如果不用js,使用纯css怎么做呢? #2348

Open
haizhilin2013 opened this issue May 8, 2020 · 3 comments
Labels
css css

Comments

@haizhilin2013
Copy link
Collaborator

第389天 除了可以用js跟踪用户信息外,如果不用js,使用纯css怎么做呢?

我也要出题

@haizhilin2013 haizhilin2013 added the css css label May 8, 2020
@mx623303468
Copy link

可以利用 css 的伪类 :hover :active :focus 之类的监听用户行为,然后给指定的url 发送请求。

#link:active::after {

content:url('xxx/xxx?active');

}

@pzting
Copy link

pzting commented May 9, 2020

为什么要用这个url呢,url为什么会生效呢
因为浏览器样式不生效就不访问链接
还可以监听鼠标位置,利用动画,一直循环
奇淫技巧,而且还不好防范
好可怕呀,平平无奇的网页暗藏杀机

@forever-z-133
Copy link

我个人觉得这是个不错的方式,不侵染 js 业务逻辑就很棒。
但难点在于如何规划,命名与元素查找是否能胜任多页面,切换环境是否灵活等。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css css
Projects
None yet
Development

No branches or pull requests

4 participants