GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /nginx/html/JimMartinson/CST1021/Resources/Examples/ |
Upload File : |
<!DOCTYPE html> <html lang="en"> <head> <title>p.class vs .class p</title> <meta charset="utf-8"> <style> .myclass p { background-color:BurlyWood; } /* This is an example of .class p */ .myclass { color:red; } div { border:1px solid silver; } p { border:1px solid #80f; color:blue; } p.myclass { color:green; } /* This is an example of p.class */ pre { margin:0; } pre.code { color:#06f; background-color:#ffc; } </style> </head> <body> <h1>p.class vs .class p</h1> The following styles are set in this document:<pre> <style> .myclass p { background-color:BurlyWood; } /* This is an example if .class p */ .myclass { color:red; } div { border:1px solid silver; } p { border:1px solid #80f; color:blue; } p.myclass { color:green; } /* This is an example of p.class */ pre { margin:0; } pre.code { color:#06f; background-color:#ffc; } </style></pre> <hr> <pre class="code"><span class="myclass">Code:</span><p>This is a paragraph with no class. Text is blue.</p></pre> <p> This is a paragraph with no class. Text is blue. </p> <hr> <pre class="code"><span class="myclass">Code:</span><div class="myclass">This is a div with class "myclass". Text is red.</div></pre> <div class="myclass"> This is a div with class "myclass". Text is red. </div> <hr> <pre class="code"><span class="myclass">Code:</span><p class="myclass">This is a paragraph with class "myclass". Text is green.</p></pre> <p class="myclass"> This is a paragraph with class "myclass". Text is green. </p> <hr> <pre class="code"><span class="myclass">Code:</span><div class="myclass">This is a div with class "myclass". Text is red.<p>There is a paragraph in this div. Text is blue because the p does not have a class. <br> It is, however, in an element with class "myclass" so it triggers the <strong>.myclass p</strong> style and the background-color is BurlyWood.</div></pre> <div class="myclass"> This is a div with class "myclass". Text is red. <p>There is a paragraph in this div. Text is blue because the p does not have a class. <br> It is, however, in an element with class "myclass" so it triggers the <strong>.myclass p</strong> style and the background-color is BurlyWood. </div> </body> </html>