linux.do
20K subscribers
83.7K photos
175 videos
88 files
202K links
linux.do最新话题和热议话题
Download Telegram
kiro倒下了,还有啥可以嫖opus

佬们,kiro倒下了,还有啥可以白票opus

13 posts - 9 participants

Read full topic

via LINUX DO - 最新话题 (author: RelaxBin)
新人报道 祝L站两周年快乐!

也是趁着两周年大赦天下成功加入L站,逛了两天论坛,迟来的报道帖 😁

2 posts - 2 participants

Read full topic

via LINUX DO - 最新话题 (author: liugu)
订阅copliot求助

好像出错了怎么办啊,绑定不了gpay?

6 posts - 3 participants

Read full topic

via LINUX DO - 最新话题 (author: 黑格尔)

Invalid media:
image
image
有关帖子申请自我管理权限的问题

我之前教程的编辑时间到了,但又需要进行内容更新,申请了自我管理
但今天好像始皇在跟公益站与一些删帖策略的问题高强度对线 :distorted_face:
中午申请的,现在还没有通过

3 posts - 2 participants

Read full topic

via LINUX DO - 最新话题 (author: 凌镜)
Deepseek API调用

向各位大佬请教一下:为何最近deepseek R1的调用效果都好差,延迟很高,报错504: Gateway time-out,例如站内佬的黑与白公益站,云雾的延迟也很高

7 posts - 5 participants

Read full topic

via LINUX DO - 最新话题 (author: LEARNER)
喜茶 年度饮品 买一送一免费领

领取方法:
1、打开支付宝、微信喜茶小程序,有弹窗,直接领
2、没有弹窗就点单,左上角滚动图,再领(图三红圈圈)
4 posts - 4 participants

Read full topic

via LINUX DO - 最新话题 (author: 胡汉三)

Invalid media: image
现在写web的话除了Claude家,还有哪个模型好用呀?

如题,哪个最好用?opus我手里的全部崩了。。。。。有没有别的模型好用的?求推荐

7 posts - 5 participants

Read full topic

via LINUX DO - 最新话题 (author: 球儿)
原文链接: 自定义网页鼠标指针——一段曲折的旅程

看到别人主题有自定义鼠标指针的功能,我也想给我主题加一个玩玩。

探索

初探

找到了相关文档:

MDN:cursor - CSS:层叠样式表 | MDN
标准文件:CSS Basic User Interface Module Level 4

看起来似乎只需要下面 CSS 代码就完事了。
:root {
cursor: url("xxx.cur"), auto;
}

随便下载了一个图标包,傻眼了:一个包里面有若干个 CUR 文件。
好吧,CUR 格式是一种图形文件格式,而不是打包了一组图标。

显然下面的写法不是很符合正确 CSS 写法。
:root {
cursor: url("auto.cur"), auto;
cursor: url("context-menu.cur"), context-menu; /* [!code ++] */
/* 省略更多 */ /* [!code ++] */
}

那有没有什么标准,说明什么网页元素用什么光标?

从 User Agent Stylesheet 学习

我想到了找 User Agent Stylesheet(用户代理样式表)

Chromium 的:Source/core/css/html.css - chromium/blink - Git at Google
Firefox 的只需要用浏览器打开 resource://gre-resources/html.css 即可看到。
未能找到 Safari 的 User Agent Stylesheet。

用户代理样式表中有这些 cursor 相关的定义:
点我展开相关定义 (click for more details) 提取聚合相关声明 (click for more details)
我们可以将这些拿出来作为声明。

从 cursor 实现学习

忽然想到,我找下 cursor: auto 是怎么实现的,对照设置下就好了,于是找到以下源码:

event_handler.cc - Chromium Code Search
chromium/third_party/blink/renderer/core/input/event_handler.cc at main · chromium/chromium

bool EventHandler::ShouldShowIBeamForNode(const Node* node,
const HitTestResult& result) {
if (!node)
return false;

if (node->IsTextNode() && (node->CanStartSelection() || result.IsOverLink()))
return true;

return IsEditable(*node);
}

std::optional<ui::Cursor> EventHandler::SelectCursor(
const ui::Cursor& i_beam = style.IsHorizontalWritingMode() ? IBeamCursor() : VerticalTextCursor();

switch (style.Cursor()) {
case ECursor::kAuto:
return SelectAutoCursor(result, node, i_beam);
// 省略
case ECursor::kText:
return i_beam;
// 省略
}
return PointerCursor();
}

std::optional<ui::Cursor> EventHandler::SelectAutoCursor(
const HitTestResult& result,
Node* node,
const ui::Cursor& i_beam) {
if (ShouldShowIBeamForNode(node, result))
return i_beam;

return PointerCursor();
}

cursor: auto 的实现逻辑非常简单:

1. 调用 ShouldShowIBeamForNode() 判断当前节点是否满足:可选择的文本/链接文本/可编辑区域(如 <input>, <textarea> 或带 contenteditable 属性的元素) 如果是,返回 i_beam(即 cursor: text
2. 默认情况返回普通箭头光标(即 cursor: default

结论:把可选择的文本/链接文本/可编辑区域设置为 cursor: text

100% 还原实现思路:写一段 JS 监听 mousemove 事件,如果满足要求,就将光标换为自定义的 cursor: text

妥协:我希望尽量使用 CSS 来实现,覆盖大部分情况,如果有需要再用 JS 判断边缘情况(如:user-select: none)。得到了以下 CSS 声明:
点我展开 CSS 相关声明 (click for more details)

发挥主观能动性

发挥主观能动性,观察标准 HTML 元素/ARIA 属性,按语义进行标注,得到了以下 CSS 声明:
一些 CSS 声明 (click for more details)

成果

聚合上面的阶段性成果,并按情况解释 cursor: auto 实际值,得到了以下的最终版本:
注:经过一次修订,去除了 *::-ms-browse(会导致 CSS 选择器失效)和 *::-ms-clear(有 ::-webkit-file-upload-button 了)。
点我展开最终版本 CSS 声明 (click for more details)
使用方法:
:root {
cursor: default; /* [!code --] */
ursor: url("实际的图标地址.cur"), default; /* [!code ++] */
}

/* 此外再补充其他需要的声明 */ /* [!code ++] */


结语

感谢您看到这里,欢迎留言交流。

2 posts - 1 participant

Read full topic

via LINUX DO - 最新话题 (author: HowieHz)
原来哪里都有搞七捻三啊

我对各位佬友们的敬佩之情是滔滔不绝连绵不绝啊 🤣
8 posts - 5 participants

Read full topic

via LINUX DO - 最新话题 (author: 草帽)

Invalid media: image
有段时间没有仔细看L站了,现在为啥都是一堆感情帖子

之前,我7月份的时候技术帖子还很多,现在要么就是失恋,还有心情不好求安慰,人生规划,一堆牛马蛇神,无奈

8 posts - 8 participants

Read full topic

via LINUX DO - 最新话题 (author: peanut)
明明自己过的不尽人意偏偏见不得人间疾苦。

希望他的事情是真的吧。

12 posts - 12 participants

Read full topic

via LINUX DO - 最新话题 (author: usopp)

Invalid media:
image
image
速度抽一个1刀绑定卡,由于是1小时卡,速度

太突然,万里汇扣款失败但还是开通了,导致卡买多了,抽了吧,又不会弄抽奖器
9点10开奖,
点赞和任意回复,
豆包选楼层

49 posts - 48 participants

Read full topic

via LINUX DO - 最新话题 (author: 椰酥)
【kiro】即将和Ops说再见了

2000个积分马上刷完,也就没有渠道了
11 posts - 8 participants

Read full topic

via LINUX DO - 最新话题 (author: 饭小范)

Invalid media: image
有佬友遇到codex的内存泄漏等一系列问题吗😭

这是我把一系列现象发给opus让他帮我分析问题所在得出的结论 😭
我已经不止一次遇到codex卡死了,然后黑屏,再亮屏,但是之后就会出现一堆问题。我也不确定opus说的对不对。有人同样遇到类似的问题吗?

我记得好像在codex的issue里面看到有人提过内存泄漏的问题。

4 posts - 2 participants

Read full topic

via LINUX DO - 最新话题 (author: dianjinqu)

Invalid media: image
为什么WSL2中使用本地Antigravity_Tools反代的api请求不通

WSL死活不通
本机Win11是可以正常使用的
有没有佬知道怎么解决
IP也没有问题在WSL中用这个IP请求本机java服务接口正常返回数据
2 posts - 2 participants

Read full topic

via LINUX DO - 最新话题 (author: javaNice)

Invalid media: image
CLIProxyAPI求解答

加载额度一直失败,会提示超时
模型调用失败率问题,大家的都是多少
在cc中使用断流的问题,任务执行到一半就停止了 希望各位大佬给解答一下

13 posts - 5 participants

Read full topic

via LINUX DO - 最新话题 (author: Little Q)

Invalid media:
image
image
哪家AI 中转可以有官网的体验?

不想要一直error,可以有官网最强的模型
贵点就贵点

8 posts - 5 participants

Read full topic

via LINUX DO - 最新话题 (author: jsjcjsjc)
刷到一个围棋网站,还蛮有意思的

有一点学习新知识或者做产品的小巧思在里边
SquishyGo

SquishyGo

SquishyGO

5 posts - 5 participants

Read full topic

via LINUX DO - 最新话题 (author: ℒ𝓊𝓂𝑒𝓃)

Invalid media:
image
image
[jetbrains插件fork] rust-analyzer-lsp 添加windows支持 (Rider 等IDE可用)

原插件hard code了路径为mac os的, fork添加了选项设置路径
需要安装rust-analyzer
where rust-analyzer
的输出路径填到插件的设置选项即可(需要重启插件)

😅不过正经人谁在rider中写rust

----------------------

fork仓库
github.com

GitHub - rere43/rust-analyzer-lsp-intellij-plugin: An IntelliJ plugin for `rust-analyzer` LSP (PoC)

An IntelliJ plugin for `rust-analyzer` LSP (PoC)

----------------------

原插件:
JetBrains Marketplace

rust-analyzer LSP - IntelliJ IDEs Plugin | Marketplace

A plugin for JetBrains IntelliJ IDE providing a rust-analyzer LSP. This plugin is currently a PoC-only, and was initially created to explore IntelliJ's LSP support. It...

----------------------

原仓库:
github.com

GitHub - ChrisCarini/rust-analyzer-lsp-intellij-plugin: An IntelliJ plugin for `rust-analyzer` LSP (PoC)

An IntelliJ plugin for `rust-analyzer` LSP (PoC)

----------------------

原作者:
GitHub

ChrisCarini - Overview

Engineer @linkedin. ChrisCarini has 87 repositories available. Follow their code on GitHub.

3 posts - 3 participants

Read full topic

via LINUX DO - 最新话题 (author: Kitkei Chan)

Invalid media:
image
image
image
image
image
任何容易重复的Prompt都装进来吧!(20260119发版)

分割线

分割线

下载链接:
通过网盘分享的文件:20260119
链接: 百度网盘 请输入提取码 提取码: prom
–来自百度网盘超级会员v3的分享
1 post - 1 participant

Read full topic

via LINUX DO - 最新话题 (author: promptonce)

Invalid media:
image
image
image
佬们平时上班都是上多久哇

这个点还在上班的佬,还有多少呢?早上9点坐到现在了,中午休息1个半钟 🤔

1 post - 1 participant

Read full topic

via LINUX DO - 最新话题 (author: Lance)