元素選擇器
阿新 • • 發佈:2022-05-08
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>元素選擇器</title> <!-- 元素選擇器 作用:根據標籤名來選中指定元素 語法:標籤名 列子:p{} b{} --> <style> p{ background-color: #008000; } h1{ font-size: 16px; } b{ background-color: #00FFFF; } </style> </head> <body> <h1>回鄉偶書</h1><b>少小離家老大回,鄉音無改鬢毛催。</b> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vel quae debitis minima quaerat nulla aut dignissimos voluptatum fuga culpa molestiae accusamus aliquam consequuntur non in quas cum et quos officiis?</p> </body> </html>