CSS的三个层次/层次是什么? [英] What are the three levels/layers of CSS?
本文介绍了CSS的三个层次/层次是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的教授说有三层/层(CSS级联样式表)。我不知道他的意思是元素类型,类和id?
解决方案
理查德建议请教授澄清他/她在那里是什么。很难从你的问题中分辨出他的意思,但他可能意味着你添加CSS的3种方式。
1.内联
它是< b style =font-size:16px;> NOT< / b>我。
2.在页面标题中
< head >
< span class =code-keyword>< title > MY CSS PAGE < span class =code-keyword>< / title >
< style type = text / css >
.headlines,.sublines,infotext {font-face:arial;颜色:黑色;背景:黄色; font-weight:bold;}
.headlines {font-size:14pt;}
.sublines {font-size:12pt;}
.infotext {font-size:10pt;}
< / style >
< / head >
3.链接的CSS文件
< head >
< title > 我的CSS PAGE < / title >
< link rel = 样式表 href < span class =code-keyword> = whatever.css 类型 = text / css >
< / head > 跨度>
My professor said there are three levels/layers of CSS (Cascading Style Sheets). I have no idea what he means is it element type, class and id?
解决方案
As Richard suggest ask the professor for clarification that is what he/she is there for. It's hard to tell what he meant just from your question but he could mean the 3 ways you add CSS.
1. Inline
It is <b style="font-size:16px;">NOT</b> me.
2. In a page header
<head> <title>MY CSS PAGE</title> <style type="text/css"> .headlines, .sublines, infotext {font-face:arial; color:black; background:yellow; font-weight:bold;} .headlines {font-size:14pt;} .sublines {font-size:12pt;} .infotext {font-size: 10pt;} </style> </head>
3. Linked CSS file
<head> <title>MY CSS PAGE</title> <link rel=stylesheet href="whatever.css" type="text/css"> </head>
这篇关于CSS的三个层次/层次是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文