<html> <head> <style type="text/css"> .div1 > p { color: yellow; } .div2 p { color: blue; } p[title] { color: red; } </style> </head> <body> <div class="div1"> <p>test </p> <span> <p>test </p> </span> </div> <div class="div2"> <p>test </p> <p>test3 </p> </div> <p title="t1">有title屬性的段落標籤</p> <p>無title屬性的段落標籤</p> </body> </html>
ref : Here
沒有留言:
張貼留言