<!DOCTYPE html> <html> <head> <style> [class|=top] { background: yellow; } </style> </head> <body> <h1>CSS [attribute|="value"] 选择器</h1> <h1 class="top-header">Welcome</h1> <p class="top-text">Hello world!</p> <p class="topcontent">Are you learning CSS?</p> </body> </html>