PHP前端开发

像 CSS 一样选择特定元素

百变鹏仔 4周前 (09-20) #CSS
文章标签 元素

要选择元素,请使用元素选择器。您可以尝试运行以下代码来选择

元素:

示例

现场演示

<!DOCTYPE html><html>   <head>      <style>         p {            color: blue;            background-color: orange;         }      </style>   </head>   <body>      <h1>Demo Website</h1>      <h2>Learning</h2>      <p>Tutorials on web dev, programming, database, networking, etc.</p>      <p>Every tutorials has lessons with illustrations and figures.</p><p><span>立即学习</span>“<a href="https://pan.quark.cn/s/cb6835dc7db1" style="text-decoration: underline !important; color: blue; font-weight: bolder;" rel="nofollow" target="_blank">前端免费学习笔记(深入)</a>”;</p>   </body></html>