English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
使用通配符“*”,选择所有元素,并设置其背景颜色和文字样式:
<!DOCTYPE html> <html> <title>기본 튜토리얼 웹사이트(oldtoolbag.com)</h/title> <head> <style> * { background-color:green; color:white; } </style> </head> <body> <h1>기본 튜토리얼 웹사이트(ko.oldtoolbag.com)</h/h1> <div class="content"> <p class="website">저희 웹사이트 주소는: ko.oldtoolbag.com./p> <p class="sitename">저희 웹사이트 이름은: 기본 튜토리얼 웹사이트.</p>/p> </div> <p>저희가 여러 가지 기본 튜토리얼을 제공합니다. 기본을 잘 배우면 더 멀리 가실 수 있습니다! </p>/p> </body> </html>테스트해보세요 ‹/›
通配符“*”选择器选择所有元素。
通配符“*”选择器也可以选择另一个元素内的所有元素:
选择<div>元素内的所有元素:
<!DOCTYPE html> <html> <title>기본 튜토리얼 웹사이트(oldtoolbag.com)</h/title> <head> <style> div * { background-color:green; } </style> </head> <body> <h1>기본 튜토리얼 웹사이트(ko.oldtoolbag.com)</h/h1> <div class="content"> <p class="website">저희 웹사이트 주소는: ko.oldtoolbag.com./p> <p class="sitename">저희 웹사이트 이름은: 기본 튜토리얼 웹사이트.</p>/p> </div> <p>저희가 여러 가지 기본 튜토리얼을 제공합니다. 기본을 잘 배우면 더 멀리 가실 수 있습니다! </p>/p> </body> </html>테스트해보세요 ‹/›
IEFirefoxOperaChromeSafari
모든 주요 브라우저가 지원합니다*선택자.