---
title: "#target-text articles | Hashnode"
description: "Explore 1 articles tagged #target-text on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/target-text"
---

Tag

# #target-text

1 posts · 0 followers

[YI-LIN CHEN (Eva)](https://hashnode.com/@im1010ioio) · [Sep 17, 2025](https://hashnode.com/posts/css-pseudo-target-and-target-text/68cace72ff3f9e133c1b63a3)

### [#66 CSS :target / ::target-text —— 在滾動時，強調 hash 連結的目標](https://im1010ioio.hashnode.dev/css-pseudo-target-and-target-text?utm_source=hashnode&utm_medium=feed)

⚠️ 本篇文章已搬遷至 css.im1010ioio.dev，請至新站閱讀完整版。 昨天我們讓很長內容的滾動範圍可以用 hash 連結滑順地滾動，今天我們要進一步優化它。 當網頁內容很長，使用者滾來滾去時可能會搞不清楚目前位置，所以今天我要來用 CSS 最簡單的方法 Highligh hash 連結的目標。 今天我們要介紹 2 個 CSS 選擇器語法： :target：針對 HTML 元素去調整樣式 ::target-text：針對指定的「文字片段」去調整樣式 非常簡單喔！讓我們一起...

1 min read · [im1010ioio.hashnode.dev](https://im1010ioio.hashnode.dev/css-pseudo-target-and-target-text?utm_source=hashnode&utm_medium=feed)
