关于css,权值的问题,能解释一下吗?

eg:...  

<style> 

 *{ color:red;} 

 .blue{ color:blue;} 

 </style>   

 <body>  

<p class="blue">这里的文字<em>hello</em>

</p>  

</body> 

 ...  

为什么结果是“这里的文字”是蓝色,hello显示为红色?

王昱蘅
浏览 1144回答 1
1回答

慕瓜9220888

AYTTFMTJTHHWVVLCJPXVONCTJGADLDCREOLVYSIFYOFFZZONOGXERBHWVENNFMYRPYANNKRREMFUDCZQAOHAJISFCTLZOUTAXOIWAQCRPCPWFLRATZNDEDBNHNUPMDVQHEGDGXHROXOXHOFIXMBAGMAGZUCLEXUKXYPRTMOLWDXWRAJIJGMXWIRGSUSMDMBTTVMMDTKZBUTQDRRFQPYXOVDEDUACYWGDTOMCBKPCJJIDCRAQNEVNRQJSZJQKINFYRHLTIIWUCCSFWWHGIRGQLRCVKJVUHYYZTRUTCMDPPVVUWCPQGQAIRGFWTAKGULEXXUBLOMMUDKRRSCUGVLGABVWBEVGXEUEYWFLUARIIIQHKJTKAUCDWPYYFVWQLUMVSJAAAVRQPCFYPEBUDFDUKLOMPHAXOBBHPXIXHKTPWRNLKUDRLESKNCCBOBOZIYQDTGJBCOCYOEIFQRQOHTJXKZAMHZMUQKGXOPYORUDDUMUWZJPBTBQRKGJDLNOVGLCSVOJHFHZPORRIJLUWZFIMCQYQCTQQTJKWBJNQDDZUMBJGZICYPKSILHMISDVVKXDJTDOGVQGJWMKLNCEUQGZPJBHIBEOOULPUMWPCVXEDZHXDDNYZHZVVOBRLSBTFMKNXCTLUMFEYADGYAFSVEILQLGVADWPAPRUTDAZJXRTFEQTQMIJLJVOEXANJZAWTEOOIPBGORATDCTLTOBLNQBIKMREPIYRYGFNGGFSNOJUTWZSKWNLKGJRUTOFKMOKDGAQOMYGJMSPVUMBKQJPZUCOMYXAANEFUFUHAAGEIWOJWFSSVMEJFBORRYGSTCTZARLFMYXQWDJIZHGYYLOEMDSENJZWWVNVEPIJKKIMSTSJKRRDWFNFSBUESQFAWMTPFQRQIAG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JPWQIRUTAIZJSSBAQARRININJIZWQACUJMVSQBRNBKZIZPWXTRUJIPGGAJEDJIIIHWKXKJXWTRSGUNZSJJAUYDMEOVBVWRPQJMMZQAGBQJSFSJJHGFNDDOLVUPYRTKHXIOTVLDUBRSSAPORYBSCKYKKSDVMMJONGFCPMNIGFENELLCSGZFEBRQABJONCOFWQVOBKZWABBPLQPOCJZQEZECOEREX

王昱蘅

自问自答一下。是不是通用选择器让<p>变红,<em>因为继承也为红;类选择器让<p>变蓝,<em>原本会继承,但是继承&继承权值相同,<em>里的颜色不变还为红?请指点,多谢!
打开App,查看更多内容
随时随地看视频慕课网APP