Poechant's CSS Learning Note (诗商的CSS学习笔记)

本文介绍了CSS的基本用法,包括内部样式、外部样式、注释及选择器等。详细讲解了如何利用CSS属性如背景颜色、边框、字体颜色等来美化网页元素,并探讨了当样式发生冲突时的解决办法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

To be continued (未完待续)...


1. Internal CSS style:

<style type="text/css">

...

</style>


2. External CSS style:

<link type="text/css" rel="stylesheet" href="mycss.css" />

Notice that <link> is an empty element.


3. Comment in CSS:

(null)


4. CSS selector

4.1. class selector:

If you have created a <p> element with "comment" class, then you chould use "." to specify this class as "p.comment". This selector could select all paragraphs in the "comment" class.

An element can be in more than one class, such as <p class="comment code article">.

4.2. id selector:

4.3. inherit selector:


5. Properties in HTML elements:

The values of these properties could be px, keyword(color, font-size), % and so forth.


background-color: This property could control the background color of an element.(背景颜色)

- kerword:Aqua,Black, Blue, Fuchsia, Gray, Green, Lime, Maroon, Navy, Olive, Orange, Purple, Red, Sliver, Teal, White, Yellow.

- %:rgb(80%, 40%, 0%)

- number:rgb(204, 102, 0)

- #number: e.g.#cc6600


background-image: You can use this property to put an image behind an element.(背景图片)


border: This property puts a border around an element. You can have a solid border, a ridged border, a dotted border.(边框)

- numberpx

- enum: dotted

- color


border-bottom:


color: Use color property to set the font color of text elements.(字体颜色)

- color


font-family: (字体)

- enum: Andale Mono,Arial,Geneva,Georgia,sans-serif,Times,Times New Roman,Trebuchet MS,Verdana


font-size:(字体大小)

- px

- %

- em, for example 1.2em, this says that the font size should be scaled by 1.2.

- keyword: xx-small, x-smal, small, medium, large, x-large, xx-large.


font-style: Use this property for italic or oblique text.

- keyword:italic,oblique


font-weight: This property controls the weight of the text.(字体粗细)

- enum: bold, normal


letter-spacing: This property controls the spacing between letters.(字间距)


line-height:This property sets the space between lines in a text element.(行间距)


list-style:This property lets you change how list items look in a list.(列表项样式)


margin: You can set how much space between the edge of the element and its content.


margin-left

- e.g. 20%


margin-right

- e.g. 20%


text-align: You can set this property as left, right or center.(对其方式)


text-decoration:

-underline


6. Some keypoints

6.1.What if multipleselectors select an element?

There are multiple selectors that match this element and define the samecolorproperty. That's what we call a "conflict". Which rule breaks the tie? Well, if one rule is morespecificthan the others, then it wins.


6.2. If you had an element that belonged only to thegreenteaclass there would be an obvious winner: thep.greenteaselector is the most specific, so the text would be green. But you have an element that belongs toall threeclasses:greentea, raspberry, andblueberry. So, p.greentea, p.raspberry, and p.blueberry all select the element, and are of equal specificity. What do you do now?

You choose the one that is listed last in the CSS file. If you can't resolve a conflict because two selectors are equally specific, you use the ordering of the rules in your style sheet file. That is, you use the rule listed last in the CSS file (nearest the bottom). And in this case, that would be thep.blueberryrule.


6.3. What will happen if there is an error in my CSS?

If you have errors in your CSS, usually what happens is all the rules below the error are ignored.


6.4. font-family 中可以指定多个字体,如果不存在第一个字体,就会使用第二个,依次类推下去。


7. CSS validator

http://jigsaw.w3.org/css-validator/

内容概要:该白皮书由IEEE发布,聚焦于电信领域大规模AI(尤其是大型电信模型,即LTMs)的发展,旨在为电信行业向6G演进提供创新解决方案。白皮书首先介绍了生成式AI在电信领域的应用潜力,强调其在实时网络编排、智能决策和自适应配置等方面的重要性。随后,详细探讨了LTMs的架构设计、部署策略及其在无线接入网(RAN)与核心网中的具体应用,如资源分配、频谱管理、信道建模等。此外,白皮书还讨论了支持LTMs的数据集、硬件要求、评估基准以及新兴应用场景,如基于边缘计算的分布式框架、联邦学习等。最后,白皮书关注了监管和伦理挑战,提出了数据治理和问责制作为确保LTMs可信运行的关键因素。 适合人群:对电信行业及AI技术感兴趣的科研人员、工程师及相关从业者。 使用场景及目标:①理解大规模AI在电信领域的应用现状和发展趋势;②探索如何利用LTMs解决电信网络中的复杂问题,如资源优化、频谱管理等;③了解LTMs在硬件要求、数据集、评估基准等方面的最新进展;④掌握应对LTMs带来的监管和伦理挑战的方法。 其他说明:白皮书不仅提供了理论和技术层面的深度剖析,还结合了大量实际案例和应用场景,为读者提供了全面的参考依据。建议读者结合自身背景,重点关注感兴趣的具体章节,如特定技术实现或应用案例,并参考提供的文献链接进行深入研究。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值