“Sel target”的版本间差异
本页内容
(创建页面,内容为“{{DISPLAYTITLE::target}}23 = CSS3 :target 选择器 = 完整CSS选择器参考手册 Highlight active HTML anchor: <sample title="" desc="" lang="html" hererun="1"> :target { border: 2px solid #D4D4D4; background-color: #e5eecc; } </sample> <run name=""> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>小白教程(xiaobai.wang)</title> <style> :target { border: 2px so…”) |
无编辑摘要 |
||
第1行: | 第1行: | ||
{{DISPLAYTITLE::target}}[[Category:css | {{DISPLAYTITLE::target}}[[Category:css selectors|39]] | ||
= CSS3 :target 选择器 = | = CSS3 :target 选择器 = | ||
2022年8月19日 (五) 04:50的最新版本
CSS3 :target 选择器
Highlight active HTML anchor:
示例
:target
{
border: 2px solid #D4D4D4;
background-color: #e5eecc;
}
定义和用法
# 锚的名称是在一个文件中链接到某个元素的URL。元素被链接到目标元素。
- target选择器可用于当前活动的target元素的样式。
浏览器支持
表格中的数字表示支持该属性的第一个浏览器版本号。
选择器 | Chrome | Internet Explorer / Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
:target | 4.0 | 9.0 | 3.5 | 3.2 | 9.6 |