简体   繁体   English

谷歌如何在 Chrome 中搜索<mark>滚动后消失的网站上的答案

[英]How Google Search in Chrome <mark> answers on sites that after scrolling disappear

Google search: republic meaning谷歌搜索:共和的意思

1-st result wikipedia.org: -->https://i.imgur.com/dQfBnhG.png<-- 1-ST导致wikipedia.org: - > https://i.imgur.com/dQfBnhG.png < -

It <mark> text and disappear after scrolling.<mark>文本并在滚动后消失。 This work on different sites only in Chrome (tried Firefox).这项工作仅适用于 Chrome(尝试过 Firefox)中的不同站点。 How is it made, can I make such thing on my vlog site?它是如何制作的,我可以在我的视频博客网站上制作这样的东西吗?

These are called text fragments As arstechnica puts it :这些被称为文本片段,正如arstechnica 所说

The syntax for this URL is pretty strange looking.这个 URL 的语法看起来很奇怪。 After the URL, the magic is in the string #:~:text= and then whatever text you want to match.在 URL 之后,魔术在字符串#:~:text= ,然后是您想要匹配的任何文本。 So a full link would look like this:所以一个完整的链接看起来像这样:

 https://en.wikipedia.org/wiki/Cat#:~:text=Most breeds of cat have a noted fondness for sitting in high places

It only seems to be active on Chrome at the moment, because Chrome is the primary pusher of this new extension to the standard.目前它似乎只在 Chrome 上处于活动状态,因为 Chrome 是这个新扩展标准的主要推动者。 Perhaps that will change in the future.也许这会在未来改变。

When on Google, Google (or the browser) will detect that you're on Google and that text links are supported, and will in some cases append the text fragment link to the URL when you click on the link.在 Google 上时,Google(或浏览器)会检测到您在 Google 上并且支持文本链接,并且在某些情况下会在您单击链接时将文本片段链接附加到 URL。 It's meant to give you a quick indicator of where to look on the page when you first load the page , which is why, after you start scrolling, it disappears.它旨在为您提供第一次加载页面在页面上查看的位置的快速指示,这就是为什么在您开始滚动后它消失的原因。

On supported browsers, you can add text fragments to the URL to highlight.在支持的浏览器上,您可以向 URL 添加文本片段以突出显示。 For example, for this Stack Overflow page, you can use the link:例如,对于此 Stack Overflow 页面,您可以使用以下链接:

https://stackoverflow.com/questions/64684251/how-google-search-in-chrome-mark-answers-on-sites-that-after-scrolling-disappe#:~:text=disappear%20after%20scrolling

here , which gives you: 这里,它为您提供:

在此处输入图片说明

On browsers which do not support this yet, the text fragment in the URL just won't do anything.在尚不支持此功能的浏览器上,URL 中的文本片段不会做任何事情。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM