HTML&CSS入门(二)之typography

本文介绍了HTML和CSS中关于typography的基础知识,包括字体属性如font-family, font-size等,以及文本属性如text-align, text-decoration等。还提到了CSS选择器的使用,如:first-child和:nth-child,用于对同类标签进行特定样式设置。" 113973760,10539863,使用Python PIL库缩放并保存网络图片,"['Python编程', '图像处理', 'PIL库', 'Tkinter GUI', '图片缩放']

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

[Dearest Cecilia, the story can resume. The one I had been planning on that evening walk. I can become again the man who once crossed the surrey park at dusk, in my best suit, swaggering on the promise of life. The man who, with the clarity of passion, made love to you in the library. The story can resume. I will return. Find you, love you, marry you and live without shame.--Atonement]


1.字体属性(font)

  •  font-family字体;
  •  font-size大小,一般用px;
  •  font-tyle格式,常用的为normal,italic(斜体);
  •  font-variant大小写,常用为normal,small-caps(小型大写);
  •  line-height行距,一般为font-size的1.5倍,当设置line-height=height时,text会居中显示,常用与button、message和其他单行的text blocks;


2.文本属性(text)

  •  text-align:(center,left,right,justify,inherit),文本对齐方式;
  •  text-decoration:(none,underline,overline,line-through,blink,inherit),文本装饰;
  •  text-indent文本缩进;
  •  text-transform文本转换:(none,capitalize,uppercase,lowercase,inherit);
  •  letter-spacing字母间距,word-spacing字间距;

 

notes:

  1. div > p {blablabla...;}  直接嵌套(directly nested)于div下面的p的样式
  2. a:link a:visited a: hover 分别为未访问过的链接,访问过的链接,鼠标悬停于上的链接
  3. 情景:很多同类标签,比如<p>,对不同的段落有不同的设置,而没有分别设置id或者class时,可用 p:first-child {} 来表示第一个,p:nth-child(x) {} 来表示第x个

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值