CSS 基础教程-112 CSS 属性选择器实例3

hrs 提交于 2020/06/06 - 20:49 , 周六

实例代码:

  <doctype html>
  <html>
  <head>
  <meta charset="utf8">
  <style>
  a[title][href]{
color:red;
}
  </style> 
  </head>
  <body>
  <h1>可以应用的样式</h1>
  <a title="dwoke  home " href="https://dwoke.com">dwoke</a>
  <hr />
  <h1>无法应用的样式</h1>
  <a href="https://dwoke.com">dwoke</a>
  </body>
  </html>

运行效果:

css_112.png

标签